mirror of
https://github.com/ditkrg/rabbit_carrots.git
synced 2026-01-25 15:12:55 +00:00
14 lines
382 B
Ruby
14 lines
382 B
Ruby
namespace :rabbit_carrots do
|
|
desc 'Rake task for standalone RabbitCarrots mode'
|
|
task eat: :environment do
|
|
Rails.application.eager_load!
|
|
|
|
logger = Logger.new(Rails.env.production? ? '/proc/self/fd/1' : $stdout)
|
|
logger.level = Logger::INFO
|
|
|
|
core_service = RabbitCarrots::Core.new(logger:)
|
|
|
|
core_service.start(kill_to_restart_on_standard_error: true)
|
|
end
|
|
end
|