Commit 40081c42 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Merge branch 'sh-fix-gitaly-cleanup-service-durations' into 'master'

Fix Gitaly duration timings for ApplyBfgObjectMapStreamRequest

See merge request gitlab-org/gitlab!34907
parents 511a7f11 3eafb563
......@@ -13,15 +13,15 @@ module Gitlab
end
def apply_bfg_object_map_stream(io, &blk)
responses = GitalyClient.call(
GitalyClient.streaming_call(
storage,
:cleanup_service,
:apply_bfg_object_map_stream,
build_object_map_enum(io),
timeout: GitalyClient.long_timeout
)
responses.each(&blk)
) do |response|
response.each(&blk)
end
end
private
......
......@@ -22,5 +22,11 @@ RSpec.describe Gitlab::GitalyClient::CleanupService do
client.apply_bfg_object_map_stream(StringIO.new)
end
it 'is wrapped as a streaming call' do
expect(Gitlab::GitalyClient).to receive(:streaming_call).with(anything, :cleanup_service, :apply_bfg_object_map_stream, anything, anything)
client.apply_bfg_object_map_stream(StringIO.new)
end
end
end
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