Skip to content
Snippets Groups Projects
Commit 2ac8180b authored by Manoj M J's avatar Manoj M J :speech_balloon:
Browse files

Do not allow inline project authorizations refresh

Do not allow inline project authorizations refresh
parent b306d65d
No related branches found
No related tags found
1 merge request!90495Do not allow waiting project authorizations refreshes
......@@ -7,7 +7,7 @@ module WaitableWorker
# Schedules multiple jobs and waits for them to be completed.
def bulk_perform_and_wait(args_list, timeout: 10)
# Short-circuit: it's more efficient to do small numbers of jobs inline
return bulk_perform_inline(args_list) if args_list.size <= 3
return bulk_perform_inline(args_list) if args_list.size <= 3 && !inline_refreshes_disallowed?
# Don't wait if there's too many jobs to be waited for. Not including the
# waiter allows them to be deduplicated and it skips waiting for jobs that
......@@ -41,6 +41,10 @@ def bulk_perform_inline(args_list)
bulk_perform_async(failed) if failed.present?
end
def inline_refreshes_disallowed?
Feature.enabled?(:do_not_allow_inline_project_authorizations_refresh)
end
end
def perform(*args)
......
---
name: do_not_allow_inline_project_authorizations_refresh
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90495
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/365585
milestone: '15.1'
type: development
group: group::workspace
default_enabled: false
......@@ -4,7 +4,6 @@ class ProjectImportScheduleWorker
include ApplicationWorker
data_consistency :delayed, feature_flag: :delayed_project_import_schedule_worker
prepend WaitableWorker
idempotent!
deduplicate :until_executing, ttl: 5.minutes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment