f0391c2517
Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
20 lines
460 B
Ruby
20 lines
460 B
Ruby
# frozen_string_literal: true
|
|
|
|
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
|