Pause MiniScheduler when Sidekiq is paused.
This commit is contained in:
parent
1e5ddb007f
commit
ee7ab3e2ec
|
@ -202,7 +202,7 @@ GEM
|
|||
mini_portile2 (2.3.0)
|
||||
mini_racer (0.2.3)
|
||||
libv8 (>= 6.3)
|
||||
mini_scheduler (0.8.1)
|
||||
mini_scheduler (0.9.0)
|
||||
mini_sql (0.1.10)
|
||||
mini_suffix (0.3.0)
|
||||
ffi (~> 1.9)
|
||||
|
|
|
@ -24,8 +24,12 @@ MiniScheduler.configure do |config|
|
|||
DiscourseEvent.trigger(:scheduled_job_ran, stat)
|
||||
end
|
||||
|
||||
config.skip_schedule { Sidekiq.paused? }
|
||||
|
||||
config.before_sidekiq_web_request do
|
||||
RailsMultisite::ConnectionManagement.establish_connection(db: 'default')
|
||||
RailsMultisite::ConnectionManagement.establish_connection(
|
||||
db: RailsMultisite::ConnectionManagement::DEFAULT
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue