diff options
author | Stan Hu <stanhu@gmail.com> | 2019-07-03 10:13:00 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-07-03 10:21:33 +0300 |
commit | d48ee86053acabf4d52effc2a6a2ba714926821d (patch) | |
tree | 9099583adb0e1c8fd2858a0f91122608a0f223a2 /lib/api/projects.rb | |
parent | 38d46edba584b59b7307ed219f5e5ad9dd0b6de6 (diff) |
Make Housekeeping button do a full garbage collection
Previously the Housekeeping button and API would use the counter of last
pushes to determine whether to do a full garbage collection, or whether
to do one of the less comprehensive tasks: a full repack, incremental
pack, or ref pack. This was confusing behavior, since a project owner
might have to click the button dozens of times before a full GC would be
initiated.
This commit forces a full GC each time this is initiated. Note that the
`ExclusiveLease` in `HousekeepingService` prevents users from clicking
on the button more than once a day.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63349
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 1e14c77b5be..a7d62014509 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -474,7 +474,7 @@ module API authorize_admin_project begin - ::Projects::HousekeepingService.new(user_project).execute + ::Projects::HousekeepingService.new(user_project, :gc).execute rescue ::Projects::HousekeepingService::LeaseTaken => error conflict!(error.message) end |