module BackgroundJobs::JobNotifier
Public Instance Methods
error(job, exception)
click to toggle source
Calls superclass method
# File lib/background_jobs/job_notifier.rb, line 7 def error(job, exception) super(job, exception) notify_error(:message => I18n.t(:flash_background_error)) end
Private Instance Methods
channel_name()
click to toggle source
# File lib/background_jobs/job_notifier.rb, line 27 def channel_name @channel_name ||= Notification::ChannelNameService.private_channel_name(@id) end
notify(event, data)
click to toggle source
# File lib/background_jobs/job_notifier.rb, line 23 def notify(event, data) Notification::NotifierService.notify(channel_name, event, data) end
notify_error(data)
click to toggle source
# File lib/background_jobs/job_notifier.rb, line 15 def notify_error(data) notify('error', data) end
notify_success(data)
click to toggle source
# File lib/background_jobs/job_notifier.rb, line 19 def notify_success(data) notify('success', data) end