diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2015-04-16 11:53:56 -0500 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2015-04-16 11:53:56 -0500 |
commit | da0015e062c046bc4bdde1ef2f48cf93ad97cc1a (patch) | |
tree | 2a114410417043379bb7799d886d9399b902c574 | |
parent | 00ea417d9205146dd957a7b7e8bce596d826a4ac (diff) | |
download | rails-da0015e062c046bc4bdde1ef2f48cf93ad97cc1a.tar.gz rails-da0015e062c046bc4bdde1ef2f48cf93ad97cc1a.tar.bz2 rails-da0015e062c046bc4bdde1ef2f48cf93ad97cc1a.zip |
Revert "Ping pubsub every 2 minutes"
This reverts commit 702c919b27940d5b46d653d31a89daf2efa674d0.
-rw-r--r-- | lib/action_cable/server.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/action_cable/server.rb b/lib/action_cable/server.rb index f7399666bc..930deec1d7 100644 --- a/lib/action_cable/server.rb +++ b/lib/action_cable/server.rb @@ -1,7 +1,5 @@ module ActionCable class Server - PUBSUB_PING_TIMEOUT = 120 - cattr_accessor(:logger, instance_reader: true) { Rails.logger } attr_accessor :registered_channels, :redis_config @@ -26,7 +24,7 @@ module ActionCable end def pubsub - @pubsub ||= redis.pubsub.tap { |pb| add_pubsub_periodic_timer(pb) } + @pubsub ||= redis.pubsub end def redis @@ -73,12 +71,5 @@ module ActionCable @connections.map(&:statistics) end - protected - def add_pubsub_periodic_timer(ps) - @pubsub_periodic_timer ||= EventMachine.add_periodic_timer(PUBSUB_PING_TIMEOUT) do - logger.info "[ActionCable] Pubsub ping" - ps.ping - end - end end end |