wr0ngway / sidekiq-dynamic-queues

A sidekiq plugin for specifying the queues a worker pulls from with wildcards, negations, or dynamic look up from redis
MIT License
17 stars 22 forks source link

Use Sidekiq::Queue.all instead of deprecated registered_queues. #3

Closed adstage-david closed 10 years ago

adstage-david commented 10 years ago

Closes #2.

adstage-david commented 10 years ago

Not entirely sure why the builds were failing when I downloaded the project - looks like maybe Tilt and other dependencies have changed and aren't locked down to a tight enough version?

Running just the queues_spec.rb file I had 3 odd failures before I started changing things:

.........................FFF

Failures:

  1) Dynamic Queues integration can work on different queues
     Failure/Error: run_queues("default")
     NoMethodError:
       undefined method `async' for nil:NilClass
     # (celluloid):0:in `remote procedure call'
     # ./spec/queues_spec.rb:226:in `(root)'

  2) Dynamic Queues integration can work on multiple queues
     Failure/Error: run_queues("other", "default")
     NoMethodError:
       undefined method `async' for nil:NilClass
     # (celluloid):0:in `remote procedure call'
     # ./spec/queues_spec.rb:236:in `(root)'

  3) Dynamic Queues integration finds work on dynamic queue that doesn't exist till after sidekiq is waiting for jobs
     Failure/Error: manager = run_queues("*", :async => true)
     NoMethodError:
       undefined method `async' for nil:NilClass
     # (celluloid):0:in `remote procedure call'
     # ./spec/queues_spec.rb:245:in `(root)'

Finished in 0.445 seconds
28 examples, 3 failures

Failed examples:

rspec ./spec/queues_spec.rb:224 # Dynamic Queues integration can work on different queues
rspec ./spec/queues_spec.rb:234 # Dynamic Queues integration can work on multiple queues
rspec ./spec/queues_spec.rb:243 # Dynamic Queues integration finds work on dynamic queue that doesn't exist till after sidekiq is waiting for jobs

The relevant tests all still pass with this change though.