binarymatt / pyres

a resque clone in python
http://github.com/binarydud/pyres
MIT License
955 stars 130 forks source link

Only the fist queue is processed from a comma-sep list of queues #78

Closed arthur78 closed 13 years ago

arthur78 commented 13 years ago

In the docs said: "Just pass a comma separated list of queues the worker should poll."

If I start the _pyresworker script with the following argument:

$ /usr/local/bin/pyres_worker "Log1, Log2"

the jobs only from the Log1 queue are performed.

If I start two workers:

$ /usr/local/bin/pyres_worker Log1 2> /dev/null &
$ /usr/local/bin/pyres_worker Log2 2> /dev/null &

the jobs from both queues are performed.

(My platform: FreeBSD 8.1, Redis 2.2.12, redis-py 2.4.9, pyres 1.1)

binarymatt commented 13 years ago

try running the worker like this:

$ /usr/local/bin/pyres_worker Log1,Log2
arthur78 commented 13 years ago

That works, thank you.

binarymatt commented 13 years ago

it looks like this behavior was introduced when the reserve method on the Job class was changed to block on reserve for the interval. So what's happening is that Log1 q is cleared out, but the worker still checks Log1 each time and waits for interval before checking Log2.

arthur78 commented 13 years ago

Is your last comment for https://github.com/binarydud/pyres/issues/77 ?

binarymatt commented 13 years ago

yes, sorry