Commit ffabab80 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'use-gitaly-migrate' into 'master'

Use gitaly_migrate helper on all current migrations in repository

See merge request !11309
parents aab904f7 6d46e510
...@@ -116,7 +116,7 @@ module Gitlab ...@@ -116,7 +116,7 @@ module Gitlab
# Returns the number of valid branches # Returns the number of valid branches
def branch_count def branch_count
Gitlab::GitalyClient.migrate(:branch_names) do |is_enabled| gitaly_migrate(:branch_names) do |is_enabled|
if is_enabled if is_enabled
gitaly_ref_client.count_branch_names gitaly_ref_client.count_branch_names
else else
...@@ -135,7 +135,7 @@ module Gitlab ...@@ -135,7 +135,7 @@ module Gitlab
# Returns the number of valid tags # Returns the number of valid tags
def tag_count def tag_count
Gitlab::GitalyClient.migrate(:tag_names) do |is_enabled| gitaly_migrate(:tag_names) do |is_enabled|
if is_enabled if is_enabled
gitaly_ref_client.count_tag_names gitaly_ref_client.count_tag_names
else else
...@@ -473,7 +473,7 @@ module Gitlab ...@@ -473,7 +473,7 @@ module Gitlab
def ref_name_for_sha(ref_path, sha) def ref_name_for_sha(ref_path, sha)
# NOTE: This feature is intentionally disabled until # NOTE: This feature is intentionally disabled until
# https://gitlab.com/gitlab-org/gitaly/issues/180 is resolved # https://gitlab.com/gitlab-org/gitaly/issues/180 is resolved
# Gitlab::GitalyClient.migrate(:find_ref_name) do |is_enabled| # gitaly_migrate(:find_ref_name) do |is_enabled|
# if is_enabled # if is_enabled
# gitaly_ref_client.find_ref_name(sha, ref_path) # gitaly_ref_client.find_ref_name(sha, ref_path)
# else # else
......
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