mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Unified background worker initialization into pre_runner_boot Set Rails.configuration.cache_classes = true for background workers
13 lines
300 B
Ruby
13 lines
300 B
Ruby
unless defined?(Rails)
|
|
puts
|
|
puts "Please run me with rails runner, for example:"
|
|
puts " RAILS_ENV=production bundle exec rails runner bin/#{File.basename($0)}"
|
|
puts
|
|
exit 1
|
|
end
|
|
|
|
Rails.configuration.cache_classes = true
|
|
|
|
Dotenv.load if ENV['APP_SECRET_TOKEN'].blank?
|
|
|
|
require 'agent_runner'
|