Skip to content

Geo: Rake task to force housekeeping on next sync

This is a follow up on https://gitlab.com/gitlab-org/gitlab-ee/issues/5717.

We need a way to mark all repositories as "run housekeeping on next sync". The easy way to do this is by setting the counter to be one of the values below minus one:

    def gc_period
      Gitlab::CurrentSettings.housekeeping_gc_period
    end

    def full_repack_period
      Gitlab::CurrentSettings.housekeeping_full_repack_period
    end

    def repack_period
      Gitlab::CurrentSettings.housekeeping_incremental_repack_period
    end

For full GC would be: Gitlab::CurrentSettings.housekeeping_gc_period - 1

Edited by Gabriel Mazetto