Skip to content

Conversation

justincastilla
Copy link

@justincastilla justincastilla commented Nov 16, 2023

Description

DOC-2644

Streams tutorial: code examples in Node.js


Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

@justincastilla justincastilla changed the base branch from master to emb-examples November 16, 2023 16:10
'location_id': '1'
}
);
console.log(res1); // >>> 1700073067968-0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without context of how comments here were done before, what is this implying, that it should be greater than that value?

count: 100,
block: 300
});
console.log(res5); // >>> [['race:france', [('1692629576966-0', {'rider': 'Castilla', 'speed': '30.2', 'position': '1', 'location_id': '1'}), ('1692629594113-0', {'rider': 'Norem', 'speed': '28.8', 'position': '3', 'location_id': '1'}), ('1692629613374-0', {'rider': 'Prickett', 'speed': '29.7', 'position': '2', 'location_id': '1'})]]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that these id values dont correspond to the comments above, perhaps there should be more consistency in how we refer to variable" settings (ala IDs)

// STEP_END

// STEP_START xRange_time
const res12 = await client.xRange('race:france', '1692629576965', '1692629576967');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because of the above mentioned id issue, this now can fail,

const res16 = await client.xRevRange('race:france', '+', '-', 1);
console.log(
res16
); // >>> [('1692629676124-0', {'rider': 'Castilla', 'speed': '29.9', 'position': '1', 'location_id': '2'})]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting all 4 results here, doesn't seem ID based?

@sjpotter
Copy link
Contributor

my primary comment here (which makes it harder to test) is that the IDs generated dont correspond to what a user would see if running it themselves, which then breaks the rest of the example code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants