docbrown/app/workers/push_notifications/deliver_worker.rb
2022-01-05 11:48:22 -06:00

18 lines
458 B
Ruby

module PushNotifications
class DeliverWorker
include Sidekiq::Worker
sidekiq_options queue: :medium_priority,
retry: 10,
lock: :until_expired,
lock_ttl: 30,
on_conflict: :log
def perform
# Deliver all pending Push Notifications
Rpush.push
# Callback for feedback (see `config/initializers/rpush.rb`)
Rpush.apns_feedback
end
end
end