2020-03-12 20:09:34 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class X509CertificateRevokeWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
2021-07-21 08:09:35 -04:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 14:10:09 -04:00
|
|
|
sidekiq_options retry: 3
|
|
|
|
|
2020-03-12 20:09:34 -04:00
|
|
|
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
|