diff options
Diffstat (limited to 'app/services/repositories/housekeeping_service.rb')
-rw-r--r-- | app/services/repositories/housekeeping_service.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/repositories/housekeeping_service.rb b/app/services/repositories/housekeeping_service.rb index de80390e60b..e12d69807f2 100644 --- a/app/services/repositories/housekeeping_service.rb +++ b/app/services/repositories/housekeeping_service.rb @@ -84,7 +84,11 @@ module Repositories end def period_match? - [gc_period, full_repack_period, repack_period, PACK_REFS_PERIOD].any? { |period| pushes_since_gc % period == 0 } + if Feature.enabled?(:optimized_housekeeping) + pushes_since_gc % repack_period == 0 + else + [gc_period, full_repack_period, repack_period, PACK_REFS_PERIOD].any? { |period| pushes_since_gc % period == 0 } + end end def housekeeping_enabled? |