attempt to work around concurrency issue with active record

This commit is contained in:
Sam 2014-02-08 15:18:54 +11:00
parent 6c8e47bcc6
commit 87a07e2355
1 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,14 @@ Sidekiq.configure_server do |config|
end
if Sidekiq.server?
# warm up AR
RailsMultisite::ConnectionManagement.each_connection do
(ActiveRecord::Base.connection.tables - %w[schema_migrations]).each do |table|
table.classify.constantize.first rescue nil
end
end
require 'scheduler/scheduler'
manager = Scheduler::Manager.new