FIX: run deferred jobs inline in sidekiq

This commit is contained in:
Sam 2018-05-23 12:05:17 +10:00
parent ff15d95983
commit 6974b7d6a8
2 changed files with 4 additions and 1 deletions

View File

@ -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|

View File

@ -21,7 +21,7 @@ module Scheduler
@paused = false
end
# for test
# for test and sidekiq
def async=(val)
@async = val
end