From f52f4a0a905480492faaa16c13be5751ccbbbee6 Mon Sep 17 00:00:00 2001 From: Shlee Date: Thu, 2 May 2024 20:55:59 +0930 Subject: [PATCH 1/8] low_delivery queue v2 --- app/workers/activitypub/low_priority_delivery_worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/workers/activitypub/low_priority_delivery_worker.rb b/app/workers/activitypub/low_priority_delivery_worker.rb index a141b8f7809..6d5f79ba9dc 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_delivery', retry: 8, dead: false end From 618ce0ddc57330b85a1c3767aa4fcf57f8d93e26 Mon Sep 17 00:00:00 2001 From: Shlee Date: Thu, 2 May 2024 20:57:00 +0930 Subject: [PATCH 2/8] Update sidekiq.yml --- config/sidekiq.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/sidekiq.yml b/config/sidekiq.yml index 488c2f2ab34..1b3b911c4e9 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -6,6 +6,7 @@ - [ingress, 4] - [mailers, 2] - [pull] + - [low_delivery] - [scheduler] :scheduler: From 40f4d069bf67ee2711acc6d4cfad25e2d8399a8c Mon Sep 17 00:00:00 2001 From: Shlee Date: Thu, 2 May 2024 20:57:47 +0930 Subject: [PATCH 3/8] Update suspended_user_cleanup_scheduler.rb --- app/workers/scheduler/suspended_user_cleanup_scheduler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/workers/scheduler/suspended_user_cleanup_scheduler.rb b/app/workers/scheduler/suspended_user_cleanup_scheduler.rb index 4ea81c785b3..f198a548c7c 100644 --- a/app/workers/scheduler/suspended_user_cleanup_scheduler.rb +++ b/app/workers/scheduler/suspended_user_cleanup_scheduler.rb @@ -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_delivery').size > MAX_PULL_SIZE process_deletion_requests! end From 7caf605384725085aa1791e0aa118d3d299e21be Mon Sep 17 00:00:00 2001 From: Shlee Date: Thu, 2 May 2024 21:03:14 +0930 Subject: [PATCH 4/8] Update sidekiq.yml --- config/sidekiq.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/sidekiq.yml b/config/sidekiq.yml index 1b3b911c4e9..057836d3f46 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -4,8 +4,8 @@ - [default, 8] - [push, 6] - [ingress, 4] - - [mailers, 2] - - [pull] + - [mailers, 3] + - [pull, 2] - [low_delivery] - [scheduler] From da416534ebfc5437e22da3d6c6a13cf2ed7c6e3b Mon Sep 17 00:00:00 2001 From: Shlee Date: Mon, 6 May 2024 23:15:09 +0930 Subject: [PATCH 5/8] Update suspended_user_cleanup_scheduler.rb --- app/workers/scheduler/suspended_user_cleanup_scheduler.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/workers/scheduler/suspended_user_cleanup_scheduler.rb b/app/workers/scheduler/suspended_user_cleanup_scheduler.rb index f198a548c7c..20b32d90f80 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('low_delivery').size > MAX_PULL_SIZE + return if Sidekiq::Queue.new('low_delivery').size > MAX_QUEUE_SIZE process_deletion_requests! end From d3a51cb24e00c89e504000385320a68d4d54e92d Mon Sep 17 00:00:00 2001 From: Shlee Date: Tue, 18 Jun 2024 01:12:50 +0930 Subject: [PATCH 6/8] Update low_priority_delivery_worker.rb --- app/workers/activitypub/low_priority_delivery_worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/workers/activitypub/low_priority_delivery_worker.rb b/app/workers/activitypub/low_priority_delivery_worker.rb index 6d5f79ba9dc..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: 'low_delivery', retry: 8, dead: false + sidekiq_options queue: 'low_priority', retry: 8, dead: false end From 3f2ffa63e5893fc5049c7757374126ab1534e1a5 Mon Sep 17 00:00:00 2001 From: Shlee Date: Tue, 18 Jun 2024 01:13:09 +0930 Subject: [PATCH 7/8] Update suspended_user_cleanup_scheduler.rb --- app/workers/scheduler/suspended_user_cleanup_scheduler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/workers/scheduler/suspended_user_cleanup_scheduler.rb b/app/workers/scheduler/suspended_user_cleanup_scheduler.rb index 20b32d90f80..de89767b3ea 100644 --- a/app/workers/scheduler/suspended_user_cleanup_scheduler.rb +++ b/app/workers/scheduler/suspended_user_cleanup_scheduler.rb @@ -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('low_delivery').size > MAX_QUEUE_SIZE + return if Sidekiq::Queue.new('low_priority').size > MAX_QUEUE_SIZE process_deletion_requests! end From 9778204e5d8a2a06d4bd06ed8d1e1b27b4286041 Mon Sep 17 00:00:00 2001 From: Shlee Date: Tue, 18 Jun 2024 01:13:24 +0930 Subject: [PATCH 8/8] Update sidekiq.yml --- config/sidekiq.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/sidekiq.yml b/config/sidekiq.yml index 057836d3f46..15be0ea6022 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -6,7 +6,7 @@ - [ingress, 4] - [mailers, 3] - [pull, 2] - - [low_delivery] + - [low_priority] - [scheduler] :scheduler: