Module: Esse::RedisStorage::QueueStats

Extended by:
Forwardable
Defined in:
lib/esse/redis_storage/queue_stats.rb

Constant Summary collapse

KEY =
"#{Esse::RedisStorage::NAMESPACE}:queues"

Class Method Summary collapse

Class Method Details

.allObject



12
13
14
# File 'lib/esse/redis_storage/queue_stats.rb', line 12

def all
  with { |conn| conn.smembers(KEY) }
end

.clearObject



24
25
26
# File 'lib/esse/redis_storage/queue_stats.rb', line 24

def clear
  with { |conn| conn.del(KEY) }
end

.delete(value) ⇒ Object



20
21
22
# File 'lib/esse/redis_storage/queue_stats.rb', line 20

def delete(value)
  with { |conn| conn.srem(KEY, value) }
end

.push(value) ⇒ Object



16
17
18
# File 'lib/esse/redis_storage/queue_stats.rb', line 16

def push(value)
  with { |conn| conn.sadd(KEY, value) }
end