Class: ActiveJob::Debounce::Configuration
- Inherits:
-
Object
- Object
- ActiveJob::Debounce::Configuration
- Defined in:
- lib/activejob/debounce/configuration.rb
Instance Attribute Summary collapse
-
#buffer ⇒ Object
Buffer time added to delay to prevent race conditions.
-
#default_delay ⇒ Object
Default debounce delay in seconds (can be overridden per-job).
-
#redis_connection ⇒ Object
Custom Redis connection.
-
#ttl ⇒ Object
TTL for Redis keys (cleanup safety net).
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 21 22 23 |
# File 'lib/activejob/debounce/configuration.rb', line 18 def initialize @redis_connection = nil @default_delay = 60 @buffer = 1 @ttl = 60 end |
Instance Attribute Details
#buffer ⇒ Object
Buffer time added to delay to prevent race conditions
13 14 15 |
# File 'lib/activejob/debounce/configuration.rb', line 13 def buffer @buffer end |
#default_delay ⇒ Object
Default debounce delay in seconds (can be overridden per-job)
10 11 12 |
# File 'lib/activejob/debounce/configuration.rb', line 10 def default_delay @default_delay end |
#redis_connection ⇒ Object
Custom Redis connection. If not set, falls back to Redis.current
7 8 9 |
# File 'lib/activejob/debounce/configuration.rb', line 7 def redis_connection @redis_connection end |
#ttl ⇒ Object
TTL for Redis keys (cleanup safety net)
16 17 18 |
# File 'lib/activejob/debounce/configuration.rb', line 16 def ttl @ttl end |