From cc8f05b3c6fd67ffa4bd0fd058f1976ec1c496c7 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 21 Nov 2011 14:10:15 +0100 Subject: [PATCH] Add __str__ to Job. --- rq/queue.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rq/queue.py b/rq/queue.py index c458432..cea592c 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -56,6 +56,13 @@ class Job(object): """ return self.func(*self.args, **self.kwargs) + def __str__(self): + return '' % ( + self.func.__name__, + ', '.join( + map(repr, self.args) + + map(lambda key, val: '%s=%r' % (key, val), self.kwargs.items()))) + @total_ordering class Queue(object):