Sha256: 1b765e08b54020e3bad4af078dfd6249f31415080fb20ed981cdc5e8e95bd9c6
Contents?: true
Size: 828 Bytes
Versions: 4
Compression:
Stored size: 828 Bytes
Contents
require 'bluth' require 'bluth/test_helpers' Familia.debug = true ## Can enqueue a job @job = ExampleHandler.enqueue :arg1 => :val1 @job.class #=> Bluth::Gob ## Job knows it's on critical queue @job.current_queue #=> :critical ## Job knows it's handler @job.handler #=> ExampleHandler ## Bluth::Critical has job id Bluth::Queue.critical.range.member? @job.jobid #=> true ## Can fetch a job from queue @gobid = Bluth::Queue.critical.pop #=> @job.jobid ## Create Gob @popped_job = Bluth::Gob.from_redis @gobid @popped_job.jobid #=> @job.jobid ## Popped job has args @popped_job.data['arg1'] #=> 'val1' ## Popped job is still critical @popped_job.current_queue #=> :critical ## Move job to another queue @popped_job.running! #=> true ## Popped job is still critical @popped_job.current_queue #=> :running @job.destroy!
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
bluth-0.6.8 | try/17_gob_try.rb |
bluth-0.6.7 | try/17_gob_try.rb |
bluth-0.6.1 | try/17_gob_try.rb |
bluth-0.6.0 | try/17_gob_try.rb |