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:
Diffstat (limited to 'lib/gitlab/gitaly_client.rb')
-rw-r--r--lib/gitlab/gitaly_client.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index 262a1ef653f..4eb1ccf32ba 100644
--- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb
@@ -432,10 +432,7 @@ module Gitlab
end
def self.filesystem_id(storage)
- response = Gitlab::GitalyClient::ServerService.new(storage).info
- storage_status = response.storage_statuses.find { |status| status.storage_name == storage }
-
- storage_status&.filesystem_id
+ Gitlab::GitalyClient::ServerService.new(storage).storage_info&.filesystem_id
end
def self.filesystem_id_from_disk(storage)
@@ -446,6 +443,14 @@ module Gitlab
nil
end
+ def self.filesystem_disk_available(storage)
+ Gitlab::GitalyClient::ServerService.new(storage).storage_disk_statistics&.available
+ end
+
+ def self.filesystem_disk_used(storage)
+ Gitlab::GitalyClient::ServerService.new(storage).storage_disk_statistics&.used
+ end
+
def self.timeout(timeout_name)
Gitlab::CurrentSettings.current_application_settings[timeout_name]
end