change sidekiq queueing to bulk push (#3536)
This commit is contained in:
parent
ce7c0def88
commit
3eedad2737
6 changed files with 23 additions and 9 deletions
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'sidekiq-scheduler'
|
||||
require 'sidekiq-bulk'
|
||||
|
||||
class Scheduler::SubscriptionsScheduler
|
||||
include Sidekiq::Worker
|
||||
|
@ -7,9 +9,7 @@ class Scheduler::SubscriptionsScheduler
|
|||
def perform
|
||||
logger.info 'Queueing PuSH re-subscriptions'
|
||||
|
||||
expiring_accounts.pluck(:id).each do |id|
|
||||
Pubsubhubbub::SubscribeWorker.perform_async(id)
|
||||
end
|
||||
Pubsubhubbub::SubscribeWorker.push_bulk(expiring_accounts.pluck(:id))
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue