Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-06-05 18:58:28 +0300
committerJacob Vosmaer <jacob@gitlab.com>2018-06-12 15:33:37 +0300
commitf376347f24f24efc157d80de63381dd22d060630 (patch)
tree73dc59fbab206b2c5e79e6144b4d02c931da92a0 /app/workers
parentb2ef7f6cd9b98681aeb2274e29f0b3aaac423fc9 (diff)
Find and mark more Git disk access locations, part 2
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/repository_fork_worker.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/workers/repository_fork_worker.rb b/app/workers/repository_fork_worker.rb
index 08b1c3a7d7a..db48bb7e8b8 100644
--- a/app/workers/repository_fork_worker.rb
+++ b/app/workers/repository_fork_worker.rb
@@ -23,10 +23,11 @@ class RepositoryForkWorker
source_repository_storage_path, source_disk_path = *args
- source_repository_storage_name = Gitlab.config.repositories.storages.find do |_, info|
- info.legacy_disk_path == source_repository_storage_path
- end&.first || raise("no shard found for path '#{source_repository_storage_path}'")
-
+ source_repository_storage_name = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
+ Gitlab.config.repositories.storages.find do |_, info|
+ info.legacy_disk_path == source_repository_storage_path
+ end&.first || raise("no shard found for path '#{source_repository_storage_path}'")
+ end
fork_repository(target_project, source_repository_storage_name, source_disk_path)
end
end