diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-03-22 20:22:34 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-03-22 20:22:34 +0300 |
commit | 5aca9be2fd5c7d929779a20defad2adc25778534 (patch) | |
tree | fb009a0ab9ac6333df01b7e2cc2f510033cc1b84 | |
parent | 46146e33f2f8dcbd52ee50eb9142887344b8c367 (diff) |
Make CI build to use optimistic locking only on status change
-rw-r--r-- | app/models/commit_status.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 8c71267da65..17b322b5ae3 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -105,6 +105,10 @@ class CommitStatus < ActiveRecord::Base end end + def locking_enabled? + status_changed? + end + def before_sha pipeline.before_sha || Gitlab::Git::BLANK_SHA end |