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
|
end
|
||||||
|
|
||||||
if Sidekiq.server?
|
if Sidekiq.server?
|
||||||
|
# defer queue should simply run in sidekiq
|
||||||
|
Scheduler::Defer.async = false
|
||||||
|
|
||||||
# warm up AR
|
# warm up AR
|
||||||
RailsMultisite::ConnectionManagement.each_connection do
|
RailsMultisite::ConnectionManagement.each_connection do
|
||||||
(ActiveRecord::Base.connection.tables - %w[schema_migrations]).each do |table|
|
(ActiveRecord::Base.connection.tables - %w[schema_migrations]).each do |table|
|
||||||
|
|
|
@ -21,7 +21,7 @@ module Scheduler
|
||||||
@paused = false
|
@paused = false
|
||||||
end
|
end
|
||||||
|
|
||||||
# for test
|
# for test and sidekiq
|
||||||
def async=(val)
|
def async=(val)
|
||||||
@async = val
|
@async = val
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue