-
-
Notifications
You must be signed in to change notification settings - Fork 485
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
Support crons with timezone for sidekiq-scheduler #2209
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2209 +/- ##
=======================================
Coverage 97.39% 97.39%
=======================================
Files 101 101
Lines 3799 3805 +6
=======================================
+ Hits 3700 3706 +6
Misses 99 99
|
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.
Co-authored-by: Stefan Jandl <[email protected]>
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
- Support crons with timezone for sidekiq-scheduler ([#2209](https://github.com/getsentry/sentry-ruby/pull/2209)) If none of the above apply, you can opt out of this check by adding |
@@ -133,8 +133,10 @@ def perform | |||
end | |||
end | |||
|
|||
class HappyWorkerForCron < HappyWorker; end |
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.
Why do we need another HappyWorkerForCron
?
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.
to keep each class isolated after patching, since we don't have a 'reverse prepend'
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.
No I mean we already had this worker before this PR, so now we have 2:
sentry-ruby/sentry-sidekiq/spec/spec_helper.rb
Lines 136 to 137 in 9b24de9
class HappyWorkerForCron < HappyWorker; end | |
class HappyWorkerForCron < HappyWorker; end |
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.
ah hmm that was probably copypasta error, thx
@@ -37,7 +37,18 @@ def new_job(name, interval_type, config, schedule, options) | |||
# so we convert it to minutes before passing in to the monitor. | |||
monitor_config = case interval_type | |||
when "cron" | |||
Sentry::Cron::MonitorConfig.from_crontab(schedule) | |||
parsed_cron = ::Fugit.parse_cron(schedule) |
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.
Can we mention the origin of Fugit
in a comment? It's a second-level dependency of sidekiq-scheduler
, through the rufus-scheduler
gem.
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.
closes #2187