Skip to content

Commit

Permalink
Don't let failed redis to prevent the app from starting.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed May 25, 2015
1 parent 8e030ce commit fc1a3fb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion config/unicorn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,10 @@
Signal.trap "TERM" do
puts "Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT"
end
$redis.client.reconnect
begin
$redis.client.reconnect
rescue => e
puts "Failed to reconnect to redis!"
puts e.backtrace
end
end

0 comments on commit fc1a3fb

Please sign in to comment.