Kondzolko/sk_progress_bar

Allow `update_progress_bar` to broadcast data to different channels

andrewhenriquef opened this issue · 0 comments

Context:

In my case, I'm working on an application that broadcasts data from background jobs to each user separately. So in this case we need to broadcast the data through different channels to don't share the data between those users.

My proposal:

I want to be able to choose to which channel I'll broadcast the data.

def self.update_progress_bar(percentage, message, jid=nil, opts = {})
  ActionCable.server.broadcast opts[:channel] || 'sk_progress_bar_channel',
                               progress_status: percentage,
                               message:  message,
                               sk_process_id: jid
end