Fix resque for postgres
This commit is contained in:
parent
19cb29e448
commit
c68540e9c9
|
@ -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 }
|
||||||
|
|
|
@ -4,6 +4,7 @@ task "resque:setup" => :environment do
|
||||||
Resque.after_fork do
|
Resque.after_fork do
|
||||||
Resque.redis.client.reconnect
|
Resque.redis.client.reconnect
|
||||||
end
|
end
|
||||||
|
Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Alias for resque:work (To run workers on Heroku)"
|
desc "Alias for resque:work (To run workers on Heroku)"
|
||||||
|
|
Loading…
Reference in a new issue