diff --git a/rq/decorators.py b/rq/decorators.py index 0c64f3d..54b53f8 100644 --- a/rq/decorators.py +++ b/rq/decorators.py @@ -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