about summary refs log tree commit diff
path: root/app/workers/scheduler
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/scheduler')
-rw-r--r--app/workers/scheduler/subscriptions_scheduler.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/workers/scheduler/subscriptions_scheduler.rb b/app/workers/scheduler/subscriptions_scheduler.rb
index 3ea3ad2b8..7bfd002f4 100644
--- a/app/workers/scheduler/subscriptions_scheduler.rb
+++ b/app/workers/scheduler/subscriptions_scheduler.rb
@@ -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