Commit 64db738f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Trying to fix resque issue

parent c5eba169
...@@ -27,3 +27,5 @@ Resque::Server.use Authentication ...@@ -27,3 +27,5 @@ Resque::Server.use Authentication
# Mailer # Mailer
Resque::Mailer.excluded_environments = [] Resque::Mailer.excluded_environments = []
Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
require 'resque/tasks' require 'resque/tasks'
task "resque:setup" => :environment do task "resque:setup" => :environment do
Resque.after_fork do Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
Resque.redis.client.reconnect
end
end end
desc "Alias for resque:work (To run workers on Heroku)" desc "Alias for resque:work (To run workers on Heroku)"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment