From 6fe8a87ed23fb2de8ad2d950e483f54cb723ac40 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 6 Jul 2015 19:46:43 +0200 Subject: Don't need a delegator for a single-use case --- lib/action_cable/channel/base.rb | 5 ----- lib/action_cable/channel/periodic_timers.rb | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/action_cable/channel') diff --git a/lib/action_cable/channel/base.rb b/lib/action_cable/channel/base.rb index cf5f593a31..49d335efea 100644 --- a/lib/action_cable/channel/base.rb +++ b/lib/action_cable/channel/base.rb @@ -104,11 +104,6 @@ module ActionCable def run_unsubscribe_callbacks self.class.on_unsubscribe_callbacks.each { |callback| send(callback) } end - - - def worker_pool - connection.worker_pool - end end end end diff --git a/lib/action_cable/channel/periodic_timers.rb b/lib/action_cable/channel/periodic_timers.rb index d7f6b52e3d..33b9ff19be 100644 --- a/lib/action_cable/channel/periodic_timers.rb +++ b/lib/action_cable/channel/periodic_timers.rb @@ -25,7 +25,7 @@ module ActionCable def start_periodic_timers self.class.periodic_timers.each do |callback, options| active_periodic_timers << EventMachine::PeriodicTimer.new(options[:every]) do - worker_pool.async.run_periodic_timer(self, callback) + connection.worker_pool.async.run_periodic_timer(self, callback) end end end -- cgit v1.2.3