Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-08-23 09:32:44 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-08-23 09:32:44 +0300
commitda4c54e4fb81d5d93d63e4f472a4dcb1e4ff9521 (patch)
tree6c20f558a6ed04a209982c24d382cd9234dc019c /app/models
parent0a2998b3193cbded4f6b5a33964e9a8d953ecbda (diff)
Run job hooks after transation commits after create
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/build.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 936e3c83dfd..095192e9894 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -47,7 +47,7 @@ module Ci
before_destroy { unscoped_project }
after_create do |build|
- BuildHooksWorker.perform_async(build.id)
+ run_after_commit { BuildHooksWorker.perform_async(build.id) }
end
after_commit :update_project_statistics_after_save, on: [:create, :update]