-
Notifications
You must be signed in to change notification settings - Fork 55
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
Fix: compatibility with all (>= 3.0) rufus-scheduler versions #97
Merged
Conversation
This file contains 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
Closed
6 tasks
kares
changed the title
Experiment: try out latest rufus scheduler
Fix: compatibility with all (>= 3.0) rufus-scheduler versions
Jan 17, 2022
andsel
approved these changes
Mar 3, 2022
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.
LGTM!
A nice work in moving the Scheduler code in a common mixin
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.
The work here is meant to get the plugin working with up-to-date rufus-scheduler versions.
ATM, LS 7.x is stuck with gem version 3.0.9 (due plugins pinning
~> 3.0.9
), see elastic/logstash#12931The previous rufus-scheduler
< 3.5
lock (got tightened in version 3.2.2 to~> 3.0.9
), was due Rufus moving theRufus::Scheduler::CronLine
class into a standalone gem (Fugit::Cron
) with a slightly changed API (removed#days
method). That feature was only used for logging and is now replaced by simply logging the calculated frequency of the cron expression.Also, part of the PR our custom
Scheduler
sub-class was reviewed for re-use with a new API draft to use across plugins (as we plan to extract theScheduler
mixin bits into its own gem), the idea being using a factory method to provide everything in one step e.g.Most plugins will only need ^^^ this, the JDBC plugin still rely on some
Rufus::Scheduler
api (not worth to push the scheduler externalization that much further atm).NOTE: we should consider not using any 3.1 - 3.5 version which had stopped using tzinfo gem for a self inventedRufus::ZoTime
class, tzinfo is (transitively) used again in version >= 3.6 through an added gem.