summaryrefslogtreecommitdiff
path: root/app/workers/x509_certificate_revoke_worker.rb
blob: cbf9fbb7525feaaf3b92d1825c46dbabc186a0fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

class X509CertificateRevokeWorker
  include ApplicationWorker

  sidekiq_options retry: 3

  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