diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-05-04 11:02:08 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-05-04 11:02:08 +0300 |
commit | 812dd06d512ab7774b375ce45aa9235aafc99911 (patch) | |
tree | 34cc187b9a70ad95967dff67f3efa397424b9aee /spec/support/redis | |
parent | 47c8e06cefb7396c6f08b9908bd34dd21c8d08b0 (diff) |
Introduce Redis helpers. Rename BuildTraceChunkFlushToDbWorker to Ci::BuildTraceChunkFlushWorker.
Diffstat (limited to 'spec/support/redis')
-rw-r--r-- | spec/support/redis/redis_helpers.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/support/redis/redis_helpers.rb b/spec/support/redis/redis_helpers.rb new file mode 100644 index 00000000000..0457e8487d8 --- /dev/null +++ b/spec/support/redis/redis_helpers.rb @@ -0,0 +1,18 @@ +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 |