diff options
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/local_notification_worker.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/workers/local_notification_worker.rb b/app/workers/local_notification_worker.rb new file mode 100644 index 000000000..748270563 --- /dev/null +++ b/app/workers/local_notification_worker.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class LocalNotificationWorker + include Sidekiq::Worker + + def perform(mention_id) + mention = Mention.find(mention_id) + NotifyService.new.call(mention.account, mention) + rescue ActiveRecord::RecordNotFound + true + end +end |