Skip to content

Commit

Permalink
Remove some redis code that doesn't seem to be needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Dec 27, 2017
1 parent 0e6d12f commit a4d70f0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion config/initializers/20-redis.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true

begin
$redis = Redis::Namespace.new :rssbox
$redis = Redis::Namespace.new(:rssbox)
rescue
puts "Failed to connect to redis!"
end
9 changes: 0 additions & 9 deletions config/puma.rb
Expand Up @@ -22,12 +22,3 @@
if ENV["LOG_ENABLED"]
stdout_redirect("#{app_path}/log/puma-stdout.log", "#{app_path}/log/puma-stderr.log", true)
end


on_worker_boot do
begin
$redis.client.reconnect
rescue
puts "Failed to reconnect to redis!"
end
end
6 changes: 0 additions & 6 deletions config/unicorn.rb
Expand Up @@ -46,16 +46,10 @@
puts "Unicorn master intercepting TERM and sending myself QUIT instead"
Process.kill "QUIT", Process.pid
end
$redis.client.disconnect
end

after_fork do |server, worker|
Signal.trap "TERM" do
puts "Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT"
end
begin
$redis.client.reconnect
rescue
puts "Failed to reconnect to redis!"
end
end

0 comments on commit a4d70f0

Please sign in to comment.