lib/sentry/sidekiq-scheduler/scheduler.rb in sentry-sidekiq-5.16.1 vs lib/sentry/sidekiq-scheduler/scheduler.rb in sentry-sidekiq-5.17.0

- old
+ new

@@ -33,11 +33,12 @@ end # For cron, every, or interval jobs — grab their schedule. # Rufus::Scheduler::EveryJob stores it's frequency in seconds, # so we convert it to minutes before passing in to the monitor. - monitor_config = case interval_type + monitor_config = + case interval_type when "cron" # fugit is a second order dependency of sidekiq-scheduler via rufus-scheduler parsed_cron = ::Fugit.parse_cron(schedule) timezone = parsed_cron.timezone @@ -50,10 +51,10 @@ else Sentry::Cron::MonitorConfig.from_crontab(schedule) end when "every", "interval" Sentry::Cron::MonitorConfig.from_interval(rufus_job.frequency.to_i / 60, :minute) - end + end # If we couldn't build a monitor config, it's either an error, or # it's a one-time job (interval_type is in, or at), in which case # we should not make a monitof for it automaticaly. return rufus_job if monitor_config.nil?