PERF: Don't allow a single user to monopolize the defer queue (#25593)

This commit is contained in:
Daniel Waterworth
2024-02-07 13:47:50 -06:00
committed by GitHub
parent 67229a7739
commit 30922855f2
5 changed files with 54 additions and 10 deletions

View File

@@ -29,6 +29,7 @@ module Hijack
Scheduler::Defer.later(
"hijack #{params["controller"]} #{params["action"]} #{info}",
force: false,
current_user: current_user&.id,
&scheduled.method(:resolve)
)
rescue WorkQueue::WorkQueueFull