Commit 3c4689c2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Store satellites lock files inside satellites dir

parent 9f087fb9
......@@ -64,7 +64,8 @@ module Gitlab
end
def lock_file
Rails.root.join("tmp", "satellite_#{project.id}.lock")
create_locks_dir unless File.exists?(lock_files_dir)
File.join(lock_files_dir, "satellite_#{project.id}.lock")
end
def path
......@@ -114,6 +115,16 @@ module Gitlab
def update_from_source!
repo.git.fetch({timeout: true}, :origin)
end
# Create directory for stroing
# satellites lock files
def create_locks_dir
FileUtils.mkdir_p(lock_files_dir)
end
def lock_files_dir
@lock_files_dir ||= File.join(Gitlab.config.satellites.path, "tmp")
end
end
end
end
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