diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 06:08:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 06:08:49 +0300 |
commit | a8c82a6395ed62380b9061a26d92e41d46c2877e (patch) | |
tree | bd8ab49ac11104ad9ae953afd4c5e0036fdddaa2 /lib/gitlab/git | |
parent | 0b881f91159cc97ccb7328a2e52977a60ea83fbe (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r-- | lib/gitlab/git/rugged_impl/use_rugged.rb | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/gitlab/git/rugged_impl/use_rugged.rb b/lib/gitlab/git/rugged_impl/use_rugged.rb index f63e35030c1..f9573bedba7 100644 --- a/lib/gitlab/git/rugged_impl/use_rugged.rb +++ b/lib/gitlab/git/rugged_impl/use_rugged.rb @@ -15,12 +15,6 @@ module Gitlab Gitlab::GitalyClient.can_use_disk?(repo.storage) end - def running_puma_with_multiple_threads? - return false unless Gitlab::Runtime.puma? - - ::Puma.respond_to?(:cli_config) && ::Puma.cli_config.options[:max_threads] > 1 - end - def execute_rugged_call(method_name, *args) Gitlab::GitalyClient::StorageSettings.allow_disk_access do start = Gitlab::Metrics::System.monotonic_time @@ -43,6 +37,22 @@ module Gitlab result end end + + def running_puma_with_multiple_threads? + return false unless Gitlab::Runtime.puma? + + ::Puma.respond_to?(:cli_config) && ::Puma.cli_config.options[:max_threads] > 1 + end + + def rugged_feature_keys + Gitlab::Git::RuggedImpl::Repository::FEATURE_FLAGS + end + + def rugged_enabled_through_feature_flag? + rugged_feature_keys.any? do |feature_key| + Feature.enabled?(feature_key) + end + end end end end |