Skip to content

Commit

Permalink
Update outdated sample codes in README.md
Browse files Browse the repository at this point in the history
* Use explicit connection management instead of `use_connection()`.
* Use `rq worker` instead of `rqworker`.
  • Loading branch information
orangain committed Feb 4, 2016
1 parent a14041a commit b92bea9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Expand Up @@ -38,9 +38,10 @@ You do use the excellent [requests][r] package, don't you?
Then, create an RQ queue:

```python
from rq import Queue, use_connection
use_connection()
q = Queue()
from redis import Redis
from rq import Queue

q = Queue(connection=Redis())
```

And enqueue the function call:
Expand All @@ -59,7 +60,7 @@ To start executing enqueued function calls in the background, start a worker
from your project's directory:

```console
$ rqworker
$ rq worker
*** Listening for work on default
Got count_words_at_url('http://nvie.com') from default
Job result = 818
Expand Down

0 comments on commit b92bea9

Please sign in to comment.