2018-06-27 07:23:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 18:09:10 +00:00
|
|
|
class InvalidGpgSignatureUpdateWorker # rubocop:disable Scalability/IdempotentWorker
|
2017-11-28 16:08:30 +00:00
|
|
|
include ApplicationWorker
|
2017-06-22 12:18:01 +00:00
|
|
|
|
2021-07-21 12:09:35 +00:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 18:10:09 +00:00
|
|
|
sidekiq_options retry: 3
|
|
|
|
|
2019-10-18 11:11:44 +00:00
|
|
|
feature_category :source_code_management
|
2020-01-24 18:09:00 +00:00
|
|
|
weight 2
|
2019-10-18 11:11:44 +00:00
|
|
|
|
2017-06-22 12:18:01 +00:00
|
|
|
def perform(gpg_key_id)
|
2021-11-10 15:13:21 +00:00
|
|
|
gpg_key = GpgKey.find_by_id(gpg_key_id)
|
2017-07-11 11:35:57 +00:00
|
|
|
|
2017-07-26 14:01:24 +00:00
|
|
|
return unless gpg_key
|
2017-07-11 11:35:57 +00:00
|
|
|
|
|
|
|
Gitlab::Gpg::InvalidGpgSignatureUpdater.new(gpg_key).run
|
2017-06-22 12:18:01 +00:00
|
|
|
end
|
|
|
|
end
|