Skip to content
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

Merged
merged 16 commits into from
Jul 20, 2016
Merged

Basic polling query alignment #403

merged 16 commits into from
Jul 20, 2016

Conversation

Poincare
Copy link
Contributor

@Poincare Poincare commented Jul 14, 2016

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:

  • Update CHANGELOG.md with your change
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

@Poincare Poincare self-assigned this Jul 15, 2016
@Poincare Poincare changed the title [WIP] Basic polling query alignment Basic polling query alignment Jul 15, 2016
@Poincare
Copy link
Contributor Author

@stubailo ready for review

@stubailo stubailo assigned stubailo and unassigned Poincare Jul 18, 2016
if (!options.pollInterval) {
throw new Error('Attempted to start a polling query without a polling interval.');
}

if (!queryId) {
queryId = this.queryManager.generateQueryId();
Copy link
Contributor

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!

@stubailo stubailo assigned Poincare and unassigned stubailo Jul 19, 2016
@Poincare
Copy link
Contributor Author

@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
Copy link
Contributor

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

Copy link
Contributor Author

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.');
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok will fix

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

Successfully merging this pull request may close these issues.

3 participants