diff options
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/push_notification_worker.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/workers/push_notification_worker.rb b/app/workers/push_notification_worker.rb new file mode 100644 index 000000000..a61d0e349 --- /dev/null +++ b/app/workers/push_notification_worker.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class PushNotificationWorker + include Sidekiq::Worker + + def perform(notification_id) + SendPushNotificationService.new.call(Notification.find(notification_id)) + rescue ActiveRecord::RecordNotFound + true + end +end |