Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ad739537
Commit
ad739537
authored
Jul 24, 2018
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make repository cleanup mandatory
parent
1c24eafb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+2
-4
No files found.
lib/gitlab/git/repository.rb
View file @
ad739537
...
...
@@ -353,8 +353,6 @@ module Gitlab
# offset: 5,
# after: Time.new(2016, 4, 21, 14, 32, 10)
# )
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/446
def
log
(
options
)
default_options
=
{
limit:
10
,
...
...
@@ -1029,8 +1027,8 @@ module Gitlab
end
def
clean_stale_repository_files
gitaly_migrate
(
:repository_cleanup
,
status:
Gitlab
::
GitalyClient
::
MigrationStatus
::
OPT_OUT
)
do
|
is_enabled
|
gitaly_repository_client
.
cleanup
if
is_enabled
&&
exists?
wrapped_gitaly_errors
do
gitaly_repository_client
.
cleanup
if
exists?
end
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
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment