diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-01-25 00:00:01 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-01-25 12:49:35 +0300 |
commit | 3441b4f93bcb606313d2cdba49144afb62e9a9b8 (patch) | |
tree | c7dfc8ebecd5289a2a04b0f918aa0966df7da934 /app | |
parent | b368447cf7fbd090704e22311dde72cd293d9779 (diff) |
Fix picking CI builds
The conflict happens when we try to update a build,
but fail to do so due to fact that we update the same build concurrently for two different runners.
Diffstat (limited to 'app')
-rw-r--r-- | app/services/ci/register_build_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/ci/register_build_service.rb b/app/services/ci/register_build_service.rb index cd548b3c8d5..ade6042c8f7 100644 --- a/app/services/ci/register_build_service.rb +++ b/app/services/ci/register_build_service.rb @@ -29,10 +29,10 @@ module Ci build.run! end - build + [build, true] rescue StateMachines::InvalidTransition, ActiveRecord::StaleObjectError - nil + [nil, false] end private |