Skip to content

Commit

Permalink
fix: eager_load! application in worker setup
Browse files Browse the repository at this point in the history
  • Loading branch information
c1n1c committed Jul 9, 2015
1 parent f28a754 commit 608be5c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/resque/integration/tasks/hooks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace :resque do
#
# @see https://github.com/resque/resque/tree/1-x-stable#workers
task :setup => :environment do
# принудительно инициализируем приложение
# (rails 3 не делают этого при запуске из rake-задачи)
Rails.application.eager_load! if Rails::VERSION::MAJOR < 4

# перенаправление вывода в файл
Resque::Integration::LogsRotator.redirect_std
# слушать HUP сигнал для ротации логов
Expand Down

0 comments on commit 608be5c

Please sign in to comment.