提交 903f9491 编写于 作者: V Valery Sizov

MR: change path to lock file

上级 ff8136cd
......@@ -26,11 +26,9 @@ class GitlabMerge
def process
Grit::Git.with_timeout(30.seconds) do
# Make sure tmp/merge_repo exists
lock_path = File.join(Rails.root, "tmp", "merge_repo")
FileUtils.mkdir_p(lock_path) unless File.exists?(File.join(Rails.root, "tmp", "merge_repo"))
lock_file = File.join(Rails.root, "tmp", "merge_repo_#{project.path}.lock")
File.open(File.join(lock_path, "#{project.path}.lock"), "w+") do |f|
File.open(lock_file, "w+") do |f|
f.flock(File::LOCK_EX)
unless project.satellite.exists?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册