Skip to content

A platform for community discussion. Free, open, simple.

PERF: Set `cluster_concurrency` for `Jobs::UpdateUsername` to 1 (#31492)

Alan Guo Xiang Tanf59108340730
diff --git a/app/jobs/regular/update_username.rb b/app/jobs/regular/update_username.rb
index 98191a516f3..5772ca3eafe 100644
--- a/app/jobs/regular/update_username.rb
+++ b/app/jobs/regular/update_username.rb
@@ -3,6 +3,9 @@
module Jobs
class UpdateUsername < ::Jobs::Base
sidekiq_options queue: "low"
+ # this is an extremely expensive job
+ # we are limiting it so only 1 per cluster runs
+ cluster_concurrency 1
def execute(args)
@user_id = args[:user_id]