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,17 +169,19 @@ module Ci ...@@ -169,17 +169,19 @@ module Ci
end end
def cancel_running def cancel_running
Gitlab::OptimisticLocking.retry_lock(statuses.cancelable) do |cancelable| Gitlab::OptimisticLocking.retry_lock(
cancelable.each(&:cancel) statuses.cancelable) do |cancelable|
end cancelable.each(&:cancel)
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|
Ci::Build.retry(build, user) failed_or_canceled.select(&:retryable?).each do |build|
Ci::Build.retry(build, user)
end
end end
end
end end
def mark_as_processable_after_stage(stage_idx) def mark_as_processable_after_stage(stage_idx)
......
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