Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Queue names with colons (":") break things #58

Open
follower opened this issue Mar 15, 2011 · 3 comments
Open

Queue names with colons (":") break things #58

follower opened this issue Mar 15, 2011 · 3 comments

Comments

@follower
Copy link

If I start a worker with:

pyres_worker "project-name:queue-name"

Then visit http://127.0.0.1:8080/workers/ the web interface breaks with:

Application Error

This is due to:

File "pyres-0.9.1-py2.7.egg/resweb/views.py", line 142, in workers
  host,pid,queues = str(w).split(':')
ValueError: too many values to unpack

Also, if a start another worker at the same time with:

pyres_worker "project-name:queue-name"

It breaks with:

File "pyres-0.9.1-py2.7.egg/pyres/worker.py", line 86, in startup
  self.prune_dead_workers()
File "pyres-0.9.1-py2.7.egg/pyres/worker.py", line 76, in prune_dead_workers
  host, pid, queues = worker.id.split(':')
ValueError: too many values to unpack

I would guess this happens in other places also.

It would be nice to be able to specify a queue name that includes a colon (":").

A fix in some places might be something like:

foo.split(':', 2)
@binarymatt
Copy link
Owner

the problem with this is that currently, the keys are namespaced in redis by using a colon. I might mark this as something to do when we refactor and allow arbitraty namespaces.

@bryanrasmussen
Copy link

Has this been done? If so do I set my queue variable to be named "project-name:queue-name"?

@binarymatt
Copy link
Owner

this is not currently implemented. I am working on a branch for allowing arbitrary namespaces that should help with this issues

@binarymatt binarymatt added the 2.0 label Apr 12, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants