File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,14 @@ queue with that comment data. Let's take a django model in this case.
30
30
comment.save()
31
31
32
32
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.
34
35
35
36
To insert a job into the queue you need to do something like this::
36
37
37
38
>>> 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
40
41
41
42
This puts a job into the queue **Spam **. Now we need to fire off our workers.
42
43
In the **scripts ** folder there is an executable::
You can’t perform that action at this time.
0 commit comments