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

Account for using {first: 0} for immediate execution of RepeatJobs #179

Merged
merged 1 commit into from
Nov 17, 2015

Conversation

JonMcPherson
Copy link
Contributor

Prior to v3, you could specify the option {first_in: 0} to have the scheduler fire the job immediately. This does not work anymore since only the symbols :now or :immediately are accounted for when setting @first_at to be slightly after Time.now (Time.now + 0.003).
Currently, @first_at will be set to Time.now if the options specify 0 and the scheduler won't fire the job until Time.now + frequency.

The Dashing dashboard framework is forced to stay on v2.0.24 due to a large amount of 3rd party widgets using {first_in: 0} to specify immediate execution of the scheduled job

Prior to v3, you could specify the option {first_in: 0} to have the scheduler fire the job immediately. This does not work anymore since only the symbols :now or :immediately are accounted for when setting @first_at to be slightly after Time.now (Time.now + 0.003).
Currently, @first_at will be set to Time.now if the options specify 0 and the scheduler won't fire the job until Time.now + frequency.

The Dashing dashboard framework (http://shopify.github.io/dashing/) is forced to stay on v2.0.24 due to a large amount of 3rd party widgets using {first_in: 0} to specify immediate execution of the scheduled job (https://github.com/Shopify/dashing/wiki/Additional-Widgets)
@jmettraux
Copy link
Owner

OK, I will bring your patch in, add specs for it and rework it.

Thanks!

jmettraux added a commit that referenced this pull request Nov 17, 2015
account for using {first: 0} for immediate execution of RepeatJobs
@jmettraux jmettraux merged commit 7dc21a3 into jmettraux:master Nov 17, 2015
JonMcPherson referenced this pull request in Shopify/dashing Nov 17, 2015
…rom using the rewritten RS (3.0). So for now let's use this version until Dashing 2.0 comes out.
jmettraux added a commit that referenced this pull request Nov 17, 2015
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.

None yet

2 participants