Module: Repositories::CanHousekeepRepository

Extended by:
ActiveSupport::Concern
Included in:
Project, Wiki
Defined in:
app/models/concerns/repositories/can_housekeep_repository.rb

Instance Method Summary collapse

Instance Method Details

#git_garbage_collect_worker_klassObject

Raises:

  • (NotImplementedError)

19
20
21
# File 'app/models/concerns/repositories/can_housekeep_repository.rb', line 19

def git_garbage_collect_worker_klass
  raise NotImplementedError
end

#increment_pushes_since_gcObject


11
12
13
# File 'app/models/concerns/repositories/can_housekeep_repository.rb', line 11

def increment_pushes_since_gc
  Gitlab::Redis::SharedState.with { |redis| redis.incr(pushes_since_gc_redis_shared_state_key) }
end

#pushes_since_gcObject


7
8
9
# File 'app/models/concerns/repositories/can_housekeep_repository.rb', line 7

def pushes_since_gc
  Gitlab::Redis::SharedState.with { |redis| redis.get(pushes_since_gc_redis_shared_state_key).to_i }
end

#reset_pushes_since_gcObject


15
16
17
# File 'app/models/concerns/repositories/can_housekeep_repository.rb', line 15

def reset_pushes_since_gc
  Gitlab::Redis::SharedState.with { |redis| redis.del(pushes_since_gc_redis_shared_state_key) }
end