pyres icon indicating copy to clipboard operation
pyres copied to clipboard

Queue names with colons (":") break things

Open follower opened this issue 13 years ago • 3 comments

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)

follower avatar Mar 15 '11 11:03 follower

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.

binarymatt avatar Mar 16 '11 14:03 binarymatt

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

bryanrasmussen avatar Jan 21 '13 12:01 bryanrasmussen

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

binarymatt avatar Jan 22 '13 14:01 binarymatt