Commit ad739537 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Make repository cleanup mandatory

parent 1c24eafb
...@@ -353,8 +353,6 @@ module Gitlab ...@@ -353,8 +353,6 @@ module Gitlab
# offset: 5, # offset: 5,
# after: Time.new(2016, 4, 21, 14, 32, 10) # after: Time.new(2016, 4, 21, 14, 32, 10)
# ) # )
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/446
def log(options) def log(options)
default_options = { default_options = {
limit: 10, limit: 10,
...@@ -1029,8 +1027,8 @@ module Gitlab ...@@ -1029,8 +1027,8 @@ module Gitlab
end end
def clean_stale_repository_files def clean_stale_repository_files
gitaly_migrate(:repository_cleanup, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled| wrapped_gitaly_errors do
gitaly_repository_client.cleanup if is_enabled && exists? gitaly_repository_client.cleanup if exists?
end end
rescue Gitlab::Git::CommandError => e # Don't fail if we can't cleanup rescue Gitlab::Git::CommandError => e # Don't fail if we can't cleanup
Rails.logger.error("Unable to clean repository on storage #{storage} with relative path #{relative_path}: #{e.message}") Rails.logger.error("Unable to clean repository on storage #{storage} with relative path #{relative_path}: #{e.message}")
......
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