binarymatt / pyres

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

Crash when enqueuing job with more than one argument #27

Closed mjrusso closed 14 years ago

mjrusso commented 14 years ago

(Thanks for fixing a previous logging bug with http://github.com/binarydud/pyres/commit/a5a0b603d059e6c11f3fd24c9a88e7001ca3919e)

There's another issue related to the logging of job arguments.

You would get this when trying to enqueue a job with more than one arg:

Traceback (most recent call last):
   ...
  File "/Users/mjr/Desktop/pyres/pyres/pyres/__init__.py", line 126, in enqueue
    logging.debug("job arguments: %s" % args)
TypeError: not all arguments converted during string formatting

(This happens because args is a tuple with length > 1.)

I modified a test to cause the current code to break, and checked in the fix to my fork here:

http://github.com/mjrusso/pyres/commit/e9440805f0268b73cecc377ad66dd20c6e1883e7

binarymatt commented 14 years ago

i've cherry-picked this and pushed it up into the master. Thanks for finding this.