diff options
Diffstat (limited to 'app/workers/concerns/waitable_worker.rb')
-rw-r--r-- | app/workers/concerns/waitable_worker.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/workers/concerns/waitable_worker.rb b/app/workers/concerns/waitable_worker.rb index 336d60d46ac..9300c2a5790 100644 --- a/app/workers/concerns/waitable_worker.rb +++ b/app/workers/concerns/waitable_worker.rb @@ -7,7 +7,7 @@ module WaitableWorker # Schedules multiple jobs and waits for them to be completed. def bulk_perform_and_wait(args_list) # Short-circuit: it's more efficient to do small numbers of jobs inline - if args_list.size == 1 + if args_list.size == 1 && !always_async_project_authorizations_refresh? return bulk_perform_inline(args_list) end @@ -29,6 +29,10 @@ module WaitableWorker bulk_perform_async(failed) if failed.present? end + + def always_async_project_authorizations_refresh? + Feature.enabled?(:always_async_project_authorizations_refresh) + end end def perform(*args) |