Commit bd3a544a authored by Lin Jen-Shin's avatar Lin Jen-Shin

Wrap against 80 chars and rename failed_or_canceled

to better reflect the status. Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7508#note_18858398
parent cc43c9ac
...@@ -169,14 +169,16 @@ module Ci ...@@ -169,14 +169,16 @@ module Ci
end end
def cancel_running def cancel_running
Gitlab::OptimisticLocking.retry_lock(statuses.cancelable) do |cancelable| Gitlab::OptimisticLocking.retry_lock(
statuses.cancelable) do |cancelable|
cancelable.each(&:cancel) cancelable.each(&:cancel)
end end
end end
def retry_failed(user) def retry_failed(user)
Gitlab::OptimisticLocking.retry_lock(builds.latest.failed_or_canceled) do |failed| Gitlab::OptimisticLocking.retry_lock(
failed.select(&:retryable?).each do |build| builds.latest.failed_or_canceled) do |failed_or_canceled|
failed_or_canceled.select(&:retryable?).each do |build|
Ci::Build.retry(build, user) Ci::Build.retry(build, user)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment