-
-
Notifications
You must be signed in to change notification settings - Fork 501
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) crons: require sidekiq-cron early #2173
(fix) crons: require sidekiq-cron early #2173
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2173 +/- ##
==========================================
- Coverage 97.40% 97.34% -0.06%
==========================================
Files 98 98
Lines 3655 3656 +1
==========================================
- Hits 3560 3559 -1
- Misses 95 97 +2
|
@@ -1,6 +1,12 @@ | |||
# frozen_string_literal: true | |||
|
|||
return unless defined?(::Sidekiq::Cron::Job) |
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.
Hm, but perhaps it's worth keeping the defined?
check in case sidekiq-cron
decides to change their API? Would be good to fail gracefully instead of erroring out.
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.
In that case they'll need to rename the constant in a way that doesn't fit the convention anymore, which I think is relatively unlikely. And if that do happen, which will be a breaking change to us, we probably don't want it to always fail silently? 🤔
In the case of Ruby 2.6, it'll install an older version of sidekiq-cron (1.9.1), which will not be compatible with our current tests due to the change in |
Yep, I’m on it.
|
@st0012 should be good to go now. |
#skip-changelog
(am I doing this right?)
Summary
Addressing this review by @st0012 on
sidekiq-cron
integration — the corresponsing fix forsidekiq-scheduler
is in #2172.