Skip to content

Commit 56c8547

Browse files
robhudsonbinarymatt
authored andcommitted
Updated example docs.
- Fixed a typo on "Resq". - Used the `Comment` class to match the example.
1 parent fd16fb3 commit 56c8547

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/source/example.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ queue with that comment data. Let's take a django model in this case.
3030
comment.save()
3131
3232
You can convert your existing class to be compatible with pyres. All you need
33-
to do is add a :attr:`queue` attribute and define a :meth:`perform` method on the class.
33+
to do is add a :attr:`queue` attribute and define a :meth:`perform` method
34+
on the class.
3435

3536
To insert a job into the queue you need to do something like this::
3637

3738
>>> from pyres import ResQ
38-
>>> r = Resq()
39-
>>> r.enqueue(Spam, 23) # Passing the comment id 23
39+
>>> r = ResQ()
40+
>>> r.enqueue(Comment, 23) # Passing the comment id 23
4041

4142
This puts a job into the queue **Spam**. Now we need to fire off our workers.
4243
In the **scripts** folder there is an executable::

0 commit comments

Comments
 (0)