Class: Gitlab::Redis::RateLimiting
- Defined in:
- lib/gitlab/redis/rate_limiting.rb
Class Method Summary collapse
-
.config_fallback ⇒ Object
The data we store on RateLimiting used to be stored on Cache.
-
.with_suppressed_errors(&block) ⇒ Object
Rescue Redis errors so we do not take the site down when the rate limiting instance is down.
Methods inherited from Wrapper
active?, config_file_name, config_file_path, #db, #encrypted_secrets, #initialize, instrumentation_class, #params, params, pool, pool_size, rails_root, redis, redis_yml_path, #secret_file, #sentinels, #sentinels?, #ssl_params, #store, store_name, #url, version, with
Constructor Details
This class inherits a constructor from Gitlab::Redis::Wrapper
Class Method Details
.config_fallback ⇒ Object
The data we store on RateLimiting used to be stored on Cache.
8 9 10 |
# File 'lib/gitlab/redis/rate_limiting.rb', line 8 def config_fallback Cache end |
.with_suppressed_errors(&block) ⇒ Object
Rescue Redis errors so we do not take the site down when the rate limiting instance is down
13 14 15 16 17 |
# File 'lib/gitlab/redis/rate_limiting.rb', line 13 def with_suppressed_errors(&block) with(&block) rescue ::Redis::BaseError, ::RedisClient::Error => e Gitlab::ErrorTracking.track_and_raise_for_dev_exception(e) end |