From 3f075c7794ca7cc6e3c566591e9929859c6c325c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 29 Jan 2017 01:30:32 +0100 Subject: API for apps to register for push notifications --- app/workers/push_notification_worker.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 app/workers/push_notification_worker.rb (limited to 'app/workers/push_notification_worker.rb') 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 -- cgit