Increased automerge timeout. Works for 300 commits MR on repo with 200MB size

This commit is contained in:
Dmitriy Zaporozhets 2012-04-21 13:23:44 +03:00
parent 7058258a2a
commit ae565d24ee

View file

@ -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