diff --git a/config/initializers/100-sidekiq.rb b/config/initializers/100-sidekiq.rb index a45ec085f77..f361c9fdeef 100644 --- a/config/initializers/100-sidekiq.rb +++ b/config/initializers/100-sidekiq.rb @@ -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| diff --git a/lib/scheduler/defer.rb b/lib/scheduler/defer.rb index 37116f58ed4..f8f37090bb2 100644 --- a/lib/scheduler/defer.rb +++ b/lib/scheduler/defer.rb @@ -21,7 +21,7 @@ module Scheduler @paused = false end - # for test + # for test and sidekiq def async=(val) @async = val end