Commit 78698698dc0cef4daa50ef89b10ff6b4352d6fc8
Exists in
master
and in
4 other branches
Merge pull request #2539 from jameswritescode/remove_passenger_fix
remove passenger_fix
Showing
1 changed file
with
0 additions
and
16 deletions
Show diff stats
config/initializers/passenger_fix.rb
| @@ -1,16 +0,0 @@ | @@ -1,16 +0,0 @@ | ||
| 1 | -if defined?(PhusionPassenger) | ||
| 2 | - | ||
| 3 | - # When you're using Passenger with smart-lv2 (default) or smart spawn method, | ||
| 4 | - # Resque doesn't recognize that it has been forked and should re-establish | ||
| 5 | - # Redis connection. You can see this error message in log: | ||
| 6 | - # Redis::InheritedError, Tried to use a connection from a child process | ||
| 7 | - # without reconnecting. You need to reconnect to Redis after forking. | ||
| 8 | - # | ||
| 9 | - # This solution is based on | ||
| 10 | - # https://github.com/redis/redis-rb/wiki/redis-rb-on-Phusion-Passenger | ||
| 11 | - # | ||
| 12 | - PhusionPassenger.on_event(:starting_worker_process) do |forked| | ||
| 13 | - # if we're in smart spawning mode, reconnect to Redis | ||
| 14 | - Resque.redis.client.reconnect if forked | ||
| 15 | - end | ||
| 16 | -end |