summaryrefslogtreecommitdiff
path: root/app/workers/build_hooks_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/build_hooks_worker.rb')
-rw-r--r--app/workers/build_hooks_worker.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/workers/build_hooks_worker.rb b/app/workers/build_hooks_worker.rb
new file mode 100644
index 00000000000..9965af935d4
--- /dev/null
+++ b/app/workers/build_hooks_worker.rb
@@ -0,0 +1,9 @@
+class BuildHooksWorker
+ include Sidekiq::Worker
+ include BuildQueue
+
+ def perform(build_id)
+ Ci::Build.find_by(id: build_id)
+ .try(:execute_hooks)
+ end
+end