diff --git a/app/workers/activitypub/low_priority_delivery_worker.rb b/app/workers/activitypub/low_priority_delivery_worker.rb index a141b8f7809..9d0b33771ce 100644 --- a/app/workers/activitypub/low_priority_delivery_worker.rb +++ b/app/workers/activitypub/low_priority_delivery_worker.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true class ActivityPub::LowPriorityDeliveryWorker < ActivityPub::DeliveryWorker - sidekiq_options queue: 'pull', retry: 8, dead: false + sidekiq_options queue: 'low_priority', retry: 8, dead: false end diff --git a/app/workers/scheduler/suspended_user_cleanup_scheduler.rb b/app/workers/scheduler/suspended_user_cleanup_scheduler.rb index 4ea81c785b3..de89767b3ea 100644 --- a/app/workers/scheduler/suspended_user_cleanup_scheduler.rb +++ b/app/workers/scheduler/suspended_user_cleanup_scheduler.rb @@ -6,7 +6,7 @@ class Scheduler::SuspendedUserCleanupScheduler # Each processed deletion request may enqueue an enormous # amount of jobs in the `pull` queue, so only enqueue when # the queue is empty or close to being so. - MAX_PULL_SIZE = 50 + MAX_QUEUE_SIZE = 50 # Since account deletion is very expensive, we want to avoid # overloading the server by queuing too much at once. @@ -19,7 +19,7 @@ class Scheduler::SuspendedUserCleanupScheduler sidekiq_options retry: 0, lock: :until_executed, lock_ttl: 1.day.to_i def perform - return if Sidekiq::Queue.new('pull').size > MAX_PULL_SIZE + return if Sidekiq::Queue.new('low_priority').size > MAX_QUEUE_SIZE process_deletion_requests! end diff --git a/config/sidekiq.yml b/config/sidekiq.yml index 488c2f2ab34..15be0ea6022 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -4,8 +4,9 @@ - [default, 8] - [push, 6] - [ingress, 4] - - [mailers, 2] - - [pull] + - [mailers, 3] + - [pull, 2] + - [low_priority] - [scheduler] :scheduler: