Allow duration to be used for scheduling every#607
Open
carsonreinke wants to merge 2 commits intoresque:masterfrom
Open
Allow duration to be used for scheduling every#607carsonreinke wants to merge 2 commits intoresque:masterfrom
carsonreinke wants to merge 2 commits intoresque:masterfrom
Conversation
0cdf0ae to
0849a0b
Compare
josephpage
suggested changes
Sep 26, 2017
| ) | ||
|
|
||
| assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size) | ||
| assert_equal(1, Resque::Scheduler.scheduled_jobs.size) |
Contributor
There was a problem hiding this comment.
Why not test the new job is well scheduled every 30s, and not 30m or 30ms ?
Contributor
There was a problem hiding this comment.
agreed, we need to test the actual schedule that's configured in the scheduler here.
Contributor
Author
There was a problem hiding this comment.
@josephpage @iloveitaly definitely, updated!
iloveitaly
requested changes
Nov 11, 2021
Contributor
iloveitaly
left a comment
There was a problem hiding this comment.
This is a great change! Left a couple comments, but we also need to:
- Update the changelog
- Rebase on master so CI runs properly
| interval_types = %w(cron every) | ||
| interval_types.each do |interval_type| | ||
| next unless !config[interval_type].nil? && !config[interval_type].empty? | ||
| next unless !config[interval_type].nil? && !config[interval_type].to_s.empty? |
Contributor
Author
There was a problem hiding this comment.
@iloveitaly I believe this is since the interval type can now be Numeric and empty? is a String only.
| ) | ||
|
|
||
| assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size) | ||
| assert_equal(1, Resque::Scheduler.scheduled_jobs.size) |
Contributor
There was a problem hiding this comment.
agreed, we need to test the actual schedule that's configured in the scheduler here.
Check for empty should be done on string Format numeric every for server Fix Rubocop complaint in test
7871ac1 to
5093a3e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature based on #605.
Since rufus-scheduler allows for numeric values for
every, durations can be used like30.minutesand1.hour.