Use run_after_commit to avoid race condition, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6342/diffs#note_17038749
This commit is contained in:
parent
98217bc067
commit
b4e751557a
1 changed files with 3 additions and 1 deletions
|
@ -84,7 +84,9 @@ module Ci
|
||||||
end
|
end
|
||||||
|
|
||||||
after_transition any => [:success, :failed] do |pipeline|
|
after_transition any => [:success, :failed] do |pipeline|
|
||||||
SendPipelineNotificationWorker.perform_async(pipeline.id)
|
pipeline.run_after_commit do
|
||||||
|
SendPipelineNotificationWorker.perform_async(pipeline.id)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue