Commit 253c5429 by Grzegorz Bizon

Execute pipeline hooks asynchronously

parent 7c07c07d
Pipeline #4577213 failed with stages
in 17 minutes 40 seconds
......@@ -71,7 +71,9 @@ module Ci
end
after_transition do |pipeline, transition|
pipeline.execute_hooks unless transition.loopback?
return if transition.loopback?
pipeline.run_after_commit { PipelineHooksWorker.perform_async(id) }
end
end
......
class PipelineHooksWorker
include Sidekiq::Worker
sidekiq_options queue: :default
def perform(pipeline_id)
# TODO, tmp failure to explore tests
raise 'error'
Ci::Pipeline.find_by(id: pipeline_id)
.try(:execute_hooks)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment