diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-05 16:59:31 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-05 16:59:31 +0300 |
commit | c9853897229ca5585c69c4675cbeefd9ca53147d (patch) | |
tree | 3e0080a4636d751a141d8b01fc891054aca5a47c /app/models | |
parent | fb12b81b422e0d17751f4b63462baa503996cd37 (diff) |
Add stage tests
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/commit.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb index c77921979a6..46370034f9a 100644 --- a/app/models/ci/commit.rb +++ b/app/models/ci/commit.rb @@ -81,7 +81,8 @@ module Ci end def stage - builds_without_retry.group(:stage_idx).select(:stage).last + running_or_pending = builds_without_retry.running_or_pending + running_or_pending.limit(1).pluck(:stage).first end def create_builds(ref, tag, user, trigger_request = nil) |