15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/sentry/sidekiq/cron/job.rb', line 15
def save
return false unless super
klass_const =
begin
::Sidekiq::Cron::Support.constantize(klass.to_s)
rescue NameError
return true
end
unless klass_const.send(:ancestors).include?(Sentry::Cron::MonitorCheckIns)
klass_const.send(:include, Sentry::Cron::MonitorCheckIns)
klass_const.send(:sentry_monitor_check_ins,
slug: name.to_s,
monitor_config: Sentry::Cron::MonitorConfig.from_crontab(parsed_cron.original))
end
true
end
|