2019-07-25 01:27:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-04 04:02:08 -04:00
|
|
|
module RedisHelpers
|
|
|
|
# config/README.md
|
|
|
|
|
|
|
|
# Usage: performance enhancement
|
|
|
|
def redis_cache_cleanup!
|
|
|
|
Gitlab::Redis::Cache.with(&:flushall)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Usage: SideKiq, Mailroom, CI Runner, Workhorse, push services
|
|
|
|
def redis_queues_cleanup!
|
|
|
|
Gitlab::Redis::Queues.with(&:flushall)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Usage: session state, rate limiting
|
|
|
|
def redis_shared_state_cleanup!
|
|
|
|
Gitlab::Redis::SharedState.with(&:flushall)
|
|
|
|
end
|
|
|
|
end
|