diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2019-05-03 00:41:05 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-05-03 00:41:05 +0300 |
commit | d25239ee0b56a1f7c00d805949d0d0009037ee54 (patch) | |
tree | 1fd3e06bfed0744e4b33f211821abf221763f516 /lib/gitlab/gitaly_client/ref_service.rb | |
parent | 8163e233252f4335d8b2ccb11ced51a77944ee4d (diff) |
Use git_garbage_collect_worker to run pack_refs
PackRefs is not an expensive gitaly call - we want to
call it more often (than as part of full `gc`) because
it helps to keep number of refs files small - too many
refs file may be a problem for deployments with
slow storage.
Diffstat (limited to 'lib/gitlab/gitaly_client/ref_service.rb')
-rw-r--r-- | lib/gitlab/gitaly_client/ref_service.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client/ref_service.rb b/lib/gitlab/gitaly_client/ref_service.rb index 6f6698607d9..b7d509dfa48 100644 --- a/lib/gitlab/gitaly_client/ref_service.rb +++ b/lib/gitlab/gitaly_client/ref_service.rb @@ -239,6 +239,12 @@ module Gitlab messages end + def pack_refs + request = Gitaly::PackRefsRequest.new(repository: @gitaly_repo) + + GitalyClient.call(@storage, :ref_service, :pack_refs, request) + end + private def consume_refs_response(response) |