1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Compare commits

...

9 commits

Author SHA1 Message Date
Shlee
3eb1310994
Merge 9778204e5d into 549ab089ee 2024-07-31 11:06:47 +00:00
Shlee
9778204e5d
Update sidekiq.yml 2024-06-18 01:13:24 +09:30
Shlee
3f2ffa63e5
Update suspended_user_cleanup_scheduler.rb 2024-06-18 01:13:09 +09:30
Shlee
d3a51cb24e
Update low_priority_delivery_worker.rb 2024-06-18 01:12:50 +09:30
Shlee
da416534eb
Update suspended_user_cleanup_scheduler.rb 2024-05-06 23:15:09 +09:30
Shlee
7caf605384
Update sidekiq.yml 2024-05-02 21:03:14 +09:30
Shlee
40f4d069bf
Update suspended_user_cleanup_scheduler.rb 2024-05-02 20:57:47 +09:30
Shlee
618ce0ddc5
Update sidekiq.yml 2024-05-02 20:57:00 +09:30
Shlee
f52f4a0a90
low_delivery queue v2 2024-05-02 20:55:59 +09:30
3 changed files with 6 additions and 5 deletions

View file

@ -1,5 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class ActivityPub::LowPriorityDeliveryWorker < ActivityPub::DeliveryWorker class ActivityPub::LowPriorityDeliveryWorker < ActivityPub::DeliveryWorker
sidekiq_options queue: 'pull', retry: 8, dead: false sidekiq_options queue: 'low_priority', retry: 8, dead: false
end end

View file

@ -6,7 +6,7 @@ class Scheduler::SuspendedUserCleanupScheduler
# Each processed deletion request may enqueue an enormous # Each processed deletion request may enqueue an enormous
# amount of jobs in the `pull` queue, so only enqueue when # amount of jobs in the `pull` queue, so only enqueue when
# the queue is empty or close to being so. # 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 # Since account deletion is very expensive, we want to avoid
# overloading the server by queuing too much at once. # 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 sidekiq_options retry: 0, lock: :until_executed, lock_ttl: 1.day.to_i
def perform 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! process_deletion_requests!
end end

View file

@ -4,8 +4,9 @@
- [default, 8] - [default, 8]
- [push, 6] - [push, 6]
- [ingress, 4] - [ingress, 4]
- [mailers, 2] - [mailers, 3]
- [pull] - [pull, 2]
- [low_priority]
- [scheduler] - [scheduler]
:scheduler: :scheduler: