Class: Gitlab::GitalyClient::CleanupService

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/gitaly_client/cleanup_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository) ⇒ CleanupService

'repository' is a Gitlab::Git::Repository


9
10
11
12
13
# File 'lib/gitlab/gitaly_client/cleanup_service.rb', line 9

def initialize(repository)
  @repository = repository
  @gitaly_repo = repository.gitaly_repository
  @storage = repository.storage
end

Instance Attribute Details

#gitaly_repoObject (readonly)

Returns the value of attribute gitaly_repo


6
7
8
# File 'lib/gitlab/gitaly_client/cleanup_service.rb', line 6

def gitaly_repo
  @gitaly_repo
end

#repositoryObject (readonly)

Returns the value of attribute repository


6
7
8
# File 'lib/gitlab/gitaly_client/cleanup_service.rb', line 6

def repository
  @repository
end

#storageObject (readonly)

Returns the value of attribute storage


6
7
8
# File 'lib/gitlab/gitaly_client/cleanup_service.rb', line 6

def storage
  @storage
end

Instance Method Details

#apply_bfg_object_map_stream(io, &blk) ⇒ Object


15
16
17
18
19
20
21
22
23
24
# File 'lib/gitlab/gitaly_client/cleanup_service.rb', line 15

def apply_bfg_object_map_stream(io, &blk)
  response = GitalyClient.call(
    storage,
    :cleanup_service,
    :apply_bfg_object_map_stream,
    build_object_map_enum(io),
    timeout: GitalyClient.long_timeout
  )
  response.each(&blk)
end