Commit 45f11780 authored by Felipe Artur's avatar Felipe Artur

Fix pipeline related failing specs

parent d614a9c3
......@@ -231,12 +231,13 @@ module Ci
end
def cancel_running
Gitlab::OptimisticLocking.retry_lock(
statuses.cancelable) do |job|
Gitlab::OptimisticLocking.retry_lock(statuses.cancelable) do |cancelable|
cancelable.find_each do |job|
yield(job) if block_given?
job.cancel
end
end
end
def auto_cancel_running(pipeline)
update(auto_canceled_by: pipeline)
......
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