nvie/rq — pull request #187 by johannth (2013-03-05 09:53:02+00:00)
Title: Made rqworker and rqinfo respect db parameters from url

I noticed when starting the `rqworker` and `rqinfo` scripts with the `--url` parameter containing a non default database, e.g. `redis://localhost:6379/2`both scripts seemed to connect to db 0 instead. This pull request fixes this behavior by ignoring the `--host`, `--port` and `--db` arguments if `--url` is there. If that is too severe we could change it so it tries to mix and match between the url and the other arguments and throw an exception if the arguments are conflicting (e.g. if the url says db 1 but `--db` says db 0).

I also fixed another issue with the `rqinfo` script, in which it would always default to only the `default` queue instead of using `Queue.all()`.

Attached are test cases that should verify this behavior and that the issues have been fixed.

Hope this makes sense and you would be willing to merge this into a release as soon as possible!