|
|
|
@ -56,6 +56,13 @@ class Job(object):
|
|
|
|
|
"""
|
|
|
|
|
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
|
|
|
|
|
class Queue(object):
|
|
|
|
|