Module: SimpleResque
- Extended by:
- SimpleResque
- Included in:
- SimpleResque
- Defined in:
- lib/simple_resque.rb,
lib/simple_resque/version.rb
Constant Summary collapse
- VERSION =
"1.1.0"
Instance Method Summary collapse
- #clear(klass) ⇒ Object
- #pop(klass) ⇒ Object
- #push(klass, *args) ⇒ Object
- #resque=(r) ⇒ Object
- #size(klass) ⇒ Object
Instance Method Details
#clear(klass) ⇒ Object
25 26 27 28 |
# File 'lib/simple_resque.rb', line 25 def clear(klass) queue_name = make_queue_name(klass) resque.remove_queue(queue_name) end |
#pop(klass) ⇒ Object
15 16 17 18 |
# File 'lib/simple_resque.rb', line 15 def pop(klass) queue_name = make_queue_name(klass) resque.pop(queue_name) end |
#push(klass, *args) ⇒ Object
10 11 12 13 |
# File 'lib/simple_resque.rb', line 10 def push(klass,*args) queue_name = make_queue_name(klass) resque.push(queue_name, class: klass, args: args) end |
#resque=(r) ⇒ Object
6 7 8 |
# File 'lib/simple_resque.rb', line 6 def resque=(r) @resque = r end |
#size(klass) ⇒ Object
20 21 22 23 |
# File 'lib/simple_resque.rb', line 20 def size(klass) queue_name = make_queue_name(klass) resque.size(queue_name) end |