Class: RooOnRails::Sidekiq::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/roo_on_rails/sidekiq/loader.rb

Class Method Summary collapse

Class Method Details

.runObject



5
6
7
8
9
10
# File 'lib/roo_on_rails/sidekiq/loader.rb', line 5

def self.run
  RooOnRails::Environment.load
  ENV['RAILS_MAX_THREADS'] = (ENV.fetch('SIDEKIQ_THREADS').to_i + 1).to_s
  ENV['DATABASE_REAPING_FREQUENCY'] = ENV['SIDEKIQ_DATABASE_REAPING_FREQUENCY']
  exec 'sidekiq'
end