FIX: run deferred jobs inline in sidekiq
This commit is contained in:
parent
ff15d95983
commit
6974b7d6a8
|
@ -13,6 +13,9 @@ Sidekiq.configure_server do |config|
|
|||
end
|
||||
|
||||
if Sidekiq.server?
|
||||
# defer queue should simply run in sidekiq
|
||||
Scheduler::Defer.async = false
|
||||
|
||||
# warm up AR
|
||||
RailsMultisite::ConnectionManagement.each_connection do
|
||||
(ActiveRecord::Base.connection.tables - %w[schema_migrations]).each do |table|
|
||||
|
|
|
@ -21,7 +21,7 @@ module Scheduler
|
|||
@paused = false
|
||||
end
|
||||
|
||||
# for test
|
||||
# for test and sidekiq
|
||||
def async=(val)
|
||||
@async = val
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue