Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-25 17:53:50 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-25 17:53:50 +0400
commit64db738f9de3839090eef6a862581a0e72f6540d (patch)
treecf4ea00a212f6dfde2e96be0ad5a0a3c6fe4d74e
parentc5eba169cdcf0d66cd7c6b34dace639a08949dd9 (diff)
Trying to fix resque issue
-rw-r--r--config/initializers/4_resque.rb2
-rw-r--r--lib/tasks/resque.rake4
2 files changed, 3 insertions, 3 deletions
diff --git a/config/initializers/4_resque.rb b/config/initializers/4_resque.rb
index 419dbe06061..03c2b785fae 100644
--- a/config/initializers/4_resque.rb
+++ b/config/initializers/4_resque.rb
@@ -27,3 +27,5 @@ Resque::Server.use Authentication
# Mailer
Resque::Mailer.excluded_environments = []
+
+Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
diff --git a/lib/tasks/resque.rake b/lib/tasks/resque.rake
index 0825324a424..36e461da660 100644
--- a/lib/tasks/resque.rake
+++ b/lib/tasks/resque.rake
@@ -1,9 +1,7 @@
require 'resque/tasks'
task "resque:setup" => :environment do
- Resque.after_fork do
- Resque.redis.client.reconnect
- end
+ Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
end
desc "Alias for resque:work (To run workers on Heroku)"