Increased automerge timeout. Works for 300 commits MR on repo with 200MB size
This commit is contained in:
parent
7058258a2a
commit
ae565d24ee
1 changed files with 18 additions and 14 deletions
|
@ -28,6 +28,7 @@ class GitlabMerge
|
|||
end
|
||||
|
||||
def pull
|
||||
Grit::Git.with_timeout(30.seconds) do
|
||||
File.open(File.join(Rails.root, "tmp", "merge_repo", "#{project.path}.lock"), "w+") do |f|
|
||||
f.flock(File::LOCK_EX)
|
||||
|
||||
|
@ -42,7 +43,10 @@ class GitlabMerge
|
|||
output = merge_repo.git.pull({}, "--no-ff", "origin", merge_request.source_branch)
|
||||
yield(merge_repo, output)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
rescue Grit::Git::GitTimeout
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue