diff options
| author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-06-05 15:51:14 +0000 |
|---|---|---|
| committer | Douwe Maan <douwe@gitlab.com> | 2018-06-05 15:51:14 +0000 |
| commit | a0808df0b627180d7773d5d13a0f64d6e7c45f5d (patch) | |
| tree | cd33f1aa2b27747ff09d10d74d2606a274dba565 /lib/tasks | |
| parent | 78d2e91b7c514c1d743294ae014f24eec7cb7d52 (diff) | |
| download | gitlab-ce-a0808df0b627180d7773d5d13a0f64d6e7c45f5d.tar.gz | |
Find and mark more Git disk access locations
Diffstat (limited to 'lib/tasks')
| -rw-r--r-- | lib/tasks/gitlab/cleanup.rake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/cleanup.rake b/lib/tasks/gitlab/cleanup.rake index d6d15285489..52ae1330d7f 100644 --- a/lib/tasks/gitlab/cleanup.rake +++ b/lib/tasks/gitlab/cleanup.rake @@ -12,7 +12,7 @@ namespace :gitlab do namespaces = Namespace.pluck(:path) namespaces << HASHED_REPOSITORY_NAME # add so that it will be ignored Gitlab.config.repositories.storages.each do |name, repository_storage| - git_base_path = repository_storage.legacy_disk_path + git_base_path = Gitlab::GitalyClient::StorageSettings.allow_disk_access { repository_storage.legacy_disk_path } all_dirs = Dir.glob(git_base_path + '/*') puts git_base_path.color(:yellow) @@ -54,7 +54,8 @@ namespace :gitlab do move_suffix = "+orphaned+#{Time.now.to_i}" Gitlab.config.repositories.storages.each do |name, repository_storage| - repo_root = repository_storage.legacy_disk_path + repo_root = Gitlab::GitalyClient::StorageSettings.allow_disk_access { repository_storage.legacy_disk_path } + # Look for global repos (legacy, depth 1) and normal repos (depth 2) IO.popen(%W(find #{repo_root} -mindepth 1 -maxdepth 2 -name *.git)) do |find| find.each_line do |path| |
