mirror of https://github.com/rq/rq.git
Add __str__ to Job.
This commit is contained in:
parent
fd3831f8f2
commit
cc8f05b3c6
|
@ -56,6 +56,13 @@ class Job(object):
|
||||||
"""
|
"""
|
||||||
return self.func(*self.args, **self.kwargs)
|
return self.func(*self.args, **self.kwargs)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return '<Job %s(%s, %s)>' % (
|
||||||
|
self.func.__name__,
|
||||||
|
', '.join(
|
||||||
|
map(repr, self.args) +
|
||||||
|
map(lambda key, val: '%s=%r' % (key, val), self.kwargs.items())))
|
||||||
|
|
||||||
|
|
||||||
@total_ordering
|
@total_ordering
|
||||||
class Queue(object):
|
class Queue(object):
|
||||||
|
|
Loading…
Reference in New Issue