mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:19:53 +01:00
91d3db4034
Co-authored-by: nilsding <nilsding@nilsding.org>
13 lines
314 B
Ruby
13 lines
314 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "rpush/daemon"
|
|
|
|
class PushNotificationWorker
|
|
include Sidekiq::Worker
|
|
|
|
sidekiq_options queue: :push_notification, retry: 0
|
|
|
|
def perform(notification_id)
|
|
Rpush::Daemon::AppRunner.enqueue(Rpush::Client::ActiveRecord::Notification.where(id: notification_id))
|
|
end
|
|
end
|