summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-20 13:30:58 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-20 13:30:58 +0200
commit5505795ed2e65da20a896b67422a075515552a35 (patch)
treed8ff573f3df7ad9497b5c9973c78b4fef230507b
parentbbdc35717c1ba08630f5b2ae59a333a81941b181 (diff)
downloadgitlab-ce-5505795ed2e65da20a896b67422a075515552a35.tar.gz
Add simple asynchronous stage update worker
-rw-r--r--app/workers/stage_update_worker.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/workers/stage_update_worker.rb b/app/workers/stage_update_worker.rb
new file mode 100644
index 00000000000..1d6f23305d6
--- /dev/null
+++ b/app/workers/stage_update_worker.rb
@@ -0,0 +1,8 @@
+class StageUpdateWorker
+ include Sidekiq::Worker
+ include PipelineQueue
+
+ def perform(stage_id)
+ Ci::Stage.find_by(id: stage_id)&.update!
+ end
+end