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:
authorRyan LaNeve <ryan.laneve@aciss.com>2013-01-25 00:15:24 +0400
committerRyan LaNeve <ryan.laneve@aciss.com>2013-01-25 19:42:57 +0400
commit8a65229b3548a421ca6e7c41a819b40d50f7e162 (patch)
treeb762df8aa5346c9b8b069d61e95b4c764445a24a /app/workers
parent639b0a8715074a166eb9ef4252e4f2b5ae5e2c84 (diff)
Updates project to process web hooks async via sidekiq.
A new queue of "project_web_hook" is used to process web hooks asynchronously, allowing each to succeed/fail (and be retried) independently. (Basically, project web hooks now process the same as system hooks.)
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/project_web_hook_worker.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/workers/project_web_hook_worker.rb b/app/workers/project_web_hook_worker.rb
new file mode 100644
index 00000000000..9f9b9b1df5f
--- /dev/null
+++ b/app/workers/project_web_hook_worker.rb
@@ -0,0 +1,9 @@
+class ProjectWebHookWorker
+ include Sidekiq::Worker
+
+ sidekiq_options queue: :project_web_hook
+
+ def perform(hook_id, data)
+ WebHook.find(hook_id).execute data
+ end
+end