From d9d6ebcac83d767700b4c3b618f7fa3ae5ef69b2 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Thu, 5 Feb 2015 17:02:01 +0530 Subject: Run periodic timers via the worker pool --- lib/action_cable/channel/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/action_cable/channel') diff --git a/lib/action_cable/channel/base.rb b/lib/action_cable/channel/base.rb index e311cc97e9..af328cf297 100644 --- a/lib/action_cable/channel/base.rb +++ b/lib/action_cable/channel/base.rb @@ -67,7 +67,7 @@ module ActionCable def start_periodic_timers self.class.periodic_timers.each do |callback, options| @_active_periodic_timers << EventMachine::PeriodicTimer.new(options[:every]) do - callback.respond_to?(:call) ? instance_exec(&callback) : send(callback) + Celluloid::Actor[:worker_pool].async.run_periodic_timer(self, callback) end end end -- cgit v1.2.3