debian-mirror-gitlab/app/workers/create_gpg_signature_worker.rb
2018-11-08 19:23:39 +05:30

18 lines
388 B
Ruby

# frozen_string_literal: true
class CreateGpgSignatureWorker
include ApplicationWorker
def perform(commit_sha, project_id)
project = Project.find_by(id: project_id)
return unless project
commit = project.commit(commit_sha)
return unless commit
# This calculates and caches the signature in the database
Gitlab::Gpg::Commit.new(commit).signature
end
end