Update comment.

main
Vincent Driessen 13 years ago
parent bfc3c3d89e
commit dbf101bc06

@ -5,17 +5,16 @@ from .queue import Queue
class job(object):
def __init__(self, queue, connection=None, timeout=None):
"""
A decorator that adds a ``delay`` method to the decorated function,
which in turn creates a RQ job when called. Accepts a ``queue``
instance as an optional argument. For example:
"""A decorator that adds a ``delay`` method to the decorated function,
which in turn creates a RQ job when called. Accepts a required ``queue``
argument that can be either a ``Queue`` instance or a string denoting
the queue name. For example:
@job(queue='default')
def simple_add(x, y):
return x + y
simple_add.delay(1, 2) # Puts simple_add function into queue
"""
self.queue = queue
self.connection = connection

Loading…
Cancel
Save