debian-mirror-gitlab/app/workers/create_gpg_signature_worker.rb

13 lines
333 B
Ruby
Raw Normal View History

2017-09-10 17:25:29 +05:30
class CreateGpgSignatureWorker
include Sidekiq::Worker
include DedicatedSidekiqQueue
def perform(commit_sha, project_id)
project = Project.find_by(id: project_id)
return unless project
# This calculates and caches the signature in the database
Gitlab::Gpg::Commit.new(project, commit_sha).signature
end
end