Browse files

Rollback changes

  • Loading branch information...
1 parent bcc8410 commit c54225ec034baaaab1c39b1db1c404dfc1b0c754 @avokhmin avokhmin committed Feb 26, 2014
Showing with 4 additions and 11 deletions.
  1. +4 −1 config/initializers/1_resque.rb
  2. +0 −10 lib/tasks/resque.rake
View
5 config/initializers/1_resque.rb
@@ -15,4 +15,7 @@
Resque::Plugins::Status::Hash.expire_in = (24 * 60 * 60) # 24hrs in seconds
-Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
+Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
+Resque.after_fork do
+ Resque.redis.client.reconnect
+end
View
10 lib/tasks/resque.rake
@@ -1,5 +1,3 @@
-require 'resque/tasks'
-
namespace :resque do
desc 'Stop all Resque workers'
task stop_workers: :environment do
@@ -9,12 +7,4 @@ namespace :resque do
end
system("kill -QUIT #{pids.join(' ')}") if pids.size > 0
end
-
- task setup: :environment do
- Resque.after_fork do
- Resque.redis.client.reconnect
- end
- Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
- end
-
end

0 comments on commit c54225e

Please sign in to comment.