Remove support for locking in pipeline retry service

This commit is contained in:
Grzegorz Bizon 2017-02-17 14:36:43 +01:00
parent 5f271a9fa2
commit b9cc02a68e

View file

@ -5,7 +5,7 @@ module Ci
raise Gitlab::Access::AccessDeniedError
end
each_build(pipeline.builds.failed_or_canceled) do |build|
pipeline.builds.failed_or_canceled.find_each do |build|
next unless build.retryable?
Ci::RetryBuildService.new(project, current_user)
@ -18,13 +18,5 @@ module Ci
pipeline.process!
end
private
def each_build(relation)
Gitlab::OptimisticLocking.retry_lock(relation) do |builds|
builds.find_each { |build| yield build }
end
end
end
end