Class: TallyJobs::CounterStore::MemoryCounterStore
- Defined in:
- lib/tally_jobs/counter_store/memory_counter_store.rb
Constant Summary collapse
- JOBS_QUEUE =
in-memory job queue
Thread::Queue.new
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#dequeue(n = 1) ⇒ Object
14 15 16 |
# File 'lib/tally_jobs/counter_store/memory_counter_store.rb', line 14 def dequeue(n = 1) JOBS_QUEUE.deq end |
#enqueue(job_clazz, *params) ⇒ Object
10 11 12 |
# File 'lib/tally_jobs/counter_store/memory_counter_store.rb', line 10 def enqueue(job_clazz, *params) JOBS_QUEUE.enq([job_clazz, *params]) end |