Sha256: f836b6af968f2a6620fac53be2fd7d9b6a54d01782c8137ede054970ec161a8a

Contents?: true

Size: 764 Bytes

Versions: 4

Compression:

Stored size: 764 Bytes

Contents

require 'bluth'
require 'bluth/test_helpers'

Bluth::Queue.critical.clear

## Knows queue names
Bluth::Queue.queues.collect(&:name)
#=> [:critical, :high, :low, :running, :successful, :failed, :orphaned]

## Knows queue keys
Bluth::Queue.queues.collect(&:rediskey)
#=> ["bluth:queue:critical", "bluth:queue:high", "bluth:queue:low", "bluth:queue:running", "bluth:queue:successful", "bluth:queue:failed", "bluth:queue:orphaned"]

## Knows a queue
ret = Bluth::Queue.critical
ret.class
#=> Familia::List

## Can push on to a queue
Bluth::Queue.critical.push 'job1'
Bluth::Queue.critical.push 'job2'
Bluth::Queue.critical.push 'job3'
Bluth::Queue.critical.size
#=> 3

## Can shift from a queue
job = Bluth::Queue.critical.shift
#=> 'job1'

Bluth::Queue.critical.clear

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bluth-0.6.8 try/15_queue_try.rb
bluth-0.6.7 try/15_queue_try.rb
bluth-0.6.1 try/15_queue_try.rb
bluth-0.6.0 try/15_queue_try.rb