Move ActionCable Broadcast Calls to sidekiq #154 (#403)

* Move Pusher Calls to sidekiq

* CR changes

Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
mbronek7
2020-01-06 18:02:41 +01:00
committed by Sojan Jose
parent 91ace96acd
commit f02d422b6a
2 changed files with 11 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
class ActionCableBroadcastJob < ApplicationJob
queue_as :default
def perform(members, event_name, data)
members.each do |member|
ActionCable.server.broadcast(member, event: event_name, data: data)
end
end
end