Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-08-02 18:37:40 +0300
committerPhil Hughes <me@iamphill.com>2017-08-02 18:37:40 +0300
commite4c20cd3fe330faa415493ee2fe30dc16fbaca80 (patch)
tree0be61b6cc59cf35d81b9271c7603e0d8b203a31c /app/workers/create_gpg_signature_worker.rb
parent25d6a6c4b528159c288995de4909e6a8da431d0b (diff)
parent88958e5a9cd364ae36f3d2837982cedb9239c3bc (diff)
Merge branch 'master' into sidebar-fly-out-sub-nav
Diffstat (limited to 'app/workers/create_gpg_signature_worker.rb')
-rw-r--r--app/workers/create_gpg_signature_worker.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/workers/create_gpg_signature_worker.rb b/app/workers/create_gpg_signature_worker.rb
new file mode 100644
index 00000000000..4f47717ff69
--- /dev/null
+++ b/app/workers/create_gpg_signature_worker.rb
@@ -0,0 +1,16 @@
+class CreateGpgSignatureWorker
+ include Sidekiq::Worker
+ include DedicatedSidekiqQueue
+
+ def perform(commit_sha, project_id)
+ project = Project.find_by(id: project_id)
+
+ return unless project
+
+ commit = project.commit(commit_sha)
+
+ return unless commit
+
+ commit.signature
+ end
+end