Class: QPush::Server::RedisKeys
- Inherits:
-
Object
- Object
- QPush::Server::RedisKeys
- Defined in:
- lib/qpush/server/redis.rb
Constant Summary collapse
- KEYS =
[:delay, :queue, :perform, :stats, :heart, :crons, :history, :morgue]
Instance Attribute Summary collapse
-
#crons ⇒ Object
readonly
Returns the value of attribute crons.
-
#delay ⇒ Object
readonly
Returns the value of attribute delay.
-
#heart ⇒ Object
readonly
Returns the value of attribute heart.
-
#history ⇒ Object
readonly
Returns the value of attribute history.
-
#morgue ⇒ Object
readonly
Returns the value of attribute morgue.
-
#perform ⇒ Object
readonly
Returns the value of attribute perform.
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
Instance Method Summary collapse
-
#initialize(options) ⇒ RedisKeys
constructor
A new instance of RedisKeys.
- #perform_list ⇒ Object
Constructor Details
#initialize(options) ⇒ RedisKeys
Returns a new instance of RedisKeys.
29 30 31 32 33 |
# File 'lib/qpush/server/redis.rb', line 29 def initialize() @namespace = [:namespace] || 'default' @priorities = [:priorities] || 5 build_keyspaces end |
Instance Attribute Details
#crons ⇒ Object (readonly)
Returns the value of attribute crons.
26 27 28 |
# File 'lib/qpush/server/redis.rb', line 26 def crons @crons end |
#delay ⇒ Object (readonly)
Returns the value of attribute delay.
26 27 28 |
# File 'lib/qpush/server/redis.rb', line 26 def delay @delay end |
#heart ⇒ Object (readonly)
Returns the value of attribute heart.
26 27 28 |
# File 'lib/qpush/server/redis.rb', line 26 def heart @heart end |
#history ⇒ Object (readonly)
Returns the value of attribute history.
26 27 28 |
# File 'lib/qpush/server/redis.rb', line 26 def history @history end |
#morgue ⇒ Object (readonly)
Returns the value of attribute morgue.
26 27 28 |
# File 'lib/qpush/server/redis.rb', line 26 def morgue @morgue end |
#perform ⇒ Object (readonly)
Returns the value of attribute perform.
26 27 28 |
# File 'lib/qpush/server/redis.rb', line 26 def perform @perform end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
26 27 28 |
# File 'lib/qpush/server/redis.rb', line 26 def queue @queue end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
26 27 28 |
# File 'lib/qpush/server/redis.rb', line 26 def stats @stats end |
Instance Method Details
#perform_list ⇒ Object
35 36 37 |
# File 'lib/qpush/server/redis.rb', line 35 def perform_list @perform_list ||= (1..@priorities).collect { |num| "#{perform}:#{num}" } end |