Commit df404f55 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Schedule async pipeline success worker after commit

parent 419518df
......@@ -3,6 +3,7 @@ module Ci
extend Ci::Model
include HasStatus
include Importable
include AfterCommitQueue
self.table_name = 'ci_commits'
......@@ -71,7 +72,7 @@ module Ci
end
after_transition [:created, :pending, :running] => :success do |pipeline|
PipelineSuccessWorker.perform_async(pipeline.id)
pipeline.run_after_commit { PipelineSuccessWorker.perform_async(id) }
end
after_transition do |pipeline, transition|
......
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