-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic polling query alignment #403
Conversation
…val are batched together
1c829a9
to
4ad080f
Compare
@stubailo ready for review |
d781038
to
72fc582
Compare
if (!options.pollInterval) { | ||
throw new Error('Attempted to start a polling query without a polling interval.'); | ||
} | ||
|
||
if (!queryId) { | ||
queryId = this.queryManager.generateQueryId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line isn't tested!
72fc582
to
d5b7fc4
Compare
@stubailo ready for review |
@@ -3,11 +3,31 @@ | |||
Expect active development and potentially significant breaking changes in the `0.x` track. We'll try to be diligent about releasing a `1.0` version in a timely fashion (ideally within 3 to 6 months), to signal the start of a more stable API. | |||
|
|||
### vNEXT | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we have committed a merge conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
||
if (options.pollInterval) { | ||
if (options.noFetch) { | ||
throw new Error('noFetch option should not use query polling.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Poincare we lost this code in the merge, it seems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok will fix
Introduces a really simple method of aligning polling queries. In most applications, there are may be queries that operate on exactly the same interval. The scheduler will fire these on the same interval meaning that the queries will be batched automatically by the batcher. Solves #401.
TODO: