diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-13 03:09:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-13 03:09:34 +0300 |
commit | 3cd08f4bf96cda3e9d3abf233095107832b17c20 (patch) | |
tree | dc09a618783a79d70f2a404374d4b850ccf9cc84 /app/workers | |
parent | dd4bee69b7d55620f7dc9db8c36b478bd4959755 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/all_queues.yml | 7 | ||||
-rw-r--r-- | app/workers/project_update_repository_storage_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/x509_certificate_revoke_worker.rb | 17 |
3 files changed, 24 insertions, 2 deletions
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index d70df18ffaf..545e8886d61 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -1291,3 +1291,10 @@ :resource_boundary: :unknown :weight: 1 :idempotent: +- :name: x509_certificate_revoke + :feature_category: :source_code_management + :has_external_dependencies: + :urgency: :low + :resource_boundary: :unknown + :weight: 1 + :idempotent: true diff --git a/app/workers/project_update_repository_storage_worker.rb b/app/workers/project_update_repository_storage_worker.rb index 2d88b532dbf..ea2b9e799c0 100644 --- a/app/workers/project_update_repository_storage_worker.rb +++ b/app/workers/project_update_repository_storage_worker.rb @@ -9,7 +9,5 @@ class ProjectUpdateRepositoryStorageWorker # rubocop:disable Scalability/Idempot project = Project.find(project_id) ::Projects::UpdateRepositoryStorageService.new(project).execute(new_repository_storage_key) - rescue ::Projects::UpdateRepositoryStorageService::RepositoryAlreadyMoved - Rails.logger.info "#{self.class}: repository already moved: #{project}" # rubocop:disable Gitlab/RailsLogger end end diff --git a/app/workers/x509_certificate_revoke_worker.rb b/app/workers/x509_certificate_revoke_worker.rb new file mode 100644 index 00000000000..abd0e5eefa7 --- /dev/null +++ b/app/workers/x509_certificate_revoke_worker.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class X509CertificateRevokeWorker + include ApplicationWorker + + feature_category :source_code_management + + idempotent! + + def perform(certificate_id) + return unless certificate_id + + X509Certificate.find_by_id(certificate_id).try do |certificate| + X509CertificateRevokeService.new.execute(certificate) + end + end +end |