diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-07 15:10:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-07 15:10:09 +0300 |
commit | 75f809a2ff829574ab91628407993187d55e14a4 (patch) | |
tree | e781d4cdc7bc7785e2d55e5186ccda1992763c93 /app/services | |
parent | 9f99bf3b0e3516471806f3595e1619b8e9af2a80 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/packages/debian/create_package_file_service.rb | 8 | ||||
-rw-r--r-- | app/services/user_project_access_changed_service.rb | 14 |
2 files changed, 15 insertions, 7 deletions
diff --git a/app/services/packages/debian/create_package_file_service.rb b/app/services/packages/debian/create_package_file_service.rb index a2fa31735fa..24e40b5c986 100644 --- a/app/services/packages/debian/create_package_file_service.rb +++ b/app/services/packages/debian/create_package_file_service.rb @@ -29,7 +29,13 @@ module Packages } ) - if params[:file_name].end_with? '.changes' + if params[:distribution].present? && params[:component].present? + ::Packages::Debian::ProcessPackageFileWorker.perform_async( + package_file.id, + params[:distribution], + params[:component] + ) + elsif params[:file_name].end_with? '.changes' ::Packages::Debian::ProcessChangesWorker.perform_async(package_file.id, current_user.id) end diff --git a/app/services/user_project_access_changed_service.rb b/app/services/user_project_access_changed_service.rb index 9f811bb699c..c282dcf176c 100644 --- a/app/services/user_project_access_changed_service.rb +++ b/app/services/user_project_access_changed_service.rb @@ -24,12 +24,14 @@ class UserProjectAccessChangedService when MEDIUM_PRIORITY AuthorizedProjectUpdate::UserRefreshWithLowUrgencyWorker.bulk_perform_in(MEDIUM_DELAY, bulk_args, batch_size: 100, batch_delay: 30.seconds) # rubocop:disable Scalability/BulkPerformWithContext when LOW_PRIORITY - with_related_class_context do - # We wrap the execution in `with_related_class_context`so as to obtain - # the location of the original caller - # in jobs enqueued from within `AuthorizedProjectUpdate::UserRefreshFromReplicaWorker` - AuthorizedProjectUpdate::UserRefreshFromReplicaWorker.bulk_perform_in( # rubocop:disable Scalability/BulkPerformWithContext - DELAY, bulk_args, batch_size: 100, batch_delay: 30.seconds) + if Feature.disabled?(:do_not_run_safety_net_auth_refresh_jobs) + with_related_class_context do + # We wrap the execution in `with_related_class_context`so as to obtain + # the location of the original caller + # in jobs enqueued from within `AuthorizedProjectUpdate::UserRefreshFromReplicaWorker` + AuthorizedProjectUpdate::UserRefreshFromReplicaWorker.bulk_perform_in( # rubocop:disable Scalability/BulkPerformWithContext + DELAY, bulk_args, batch_size: 100, batch_delay: 30.seconds) + end end end |