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

Update scheduler.ts #555

Closed
wants to merge 2 commits into from
Closed

Update scheduler.ts #555

wants to merge 2 commits into from

Conversation

pfulop
Copy link
Contributor

@pfulop pfulop commented Aug 18, 2016

There was a bug if pollInterval was created scheduler had timer set. However after deleting the interval and creating new one with same interval value, the scheduler wouldn't reschedule (the scheduler cleared the timer since it had empty list in intervalQueries). In this case any more intervalQueries with same interval would not simply run.

TODO:

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

If there was already created timer for this interval and interval was then removed, the next polling interval won't start new timer.
@apollo-cla
Copy link

@pfulop: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

@Poincare
Copy link
Contributor

Thanks for catching this!

I think your solution to the issue is correct; could you write a test case that tests this behavior? It would probably go in test/scheduler.ts and should test the length of the list within intervalQueries as well as whether or not the correct polling query is fired.

@pfulop
Copy link
Contributor Author

pfulop commented Aug 18, 2016

My first PR so I hope I've got it right.

@stubailo
Copy link
Contributor

@pfulop can you sign the contributor agreement, so we can accept the PR? Looking really great so far!

@BLamy
Copy link

BLamy commented Aug 19, 2016

I can confirm that this fixed the issue I was having, Thanks pfulop.

@stubailo
Copy link
Contributor

Going to merge this via #568

@stubailo stubailo closed this Aug 19, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants