Class: PushDispatchJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/push_dispatch_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(push_message_id) ⇒ Object



4
5
6
7
8
9
# File 'app/jobs/push_dispatch_job.rb', line 4

def perform(push_message_id)
  message = PushMessage.find_by(id: push_message_id)
  return unless message

  ThecoreBackendCommons::PushNotificationService.dispatch(message.push_subscriber, message)
end