Skip to content
Snippets Groups Projects
Commit b4e75155 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Use run_after_commit to avoid race condition, feedback:

parent 98217bc0
No related branches found
No related tags found
1 merge request!6342Integrate CI emails into notification system
Loading
@@ -84,9 +84,11 @@ module Ci
Loading
@@ -84,9 +84,11 @@ module Ci
end end
   
after_transition any => [:success, :failed] do |pipeline| after_transition any => [:success, :failed] do |pipeline|
pipeline.run_after_commit do
SendPipelineNotificationWorker.perform_async(pipeline.id) SendPipelineNotificationWorker.perform_async(pipeline.id)
end end
end end
end
   
# ref can't be HEAD or SHA, can only be branch/tag name # ref can't be HEAD or SHA, can only be branch/tag name
def self.latest_successful_for(ref) def self.latest_successful_for(ref)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment