summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authororangain <orangain@gmail.com>2016-02-04 22:12:06 +0900
committerorangain <orangain@gmail.com>2016-02-04 22:12:06 +0900
commitb92bea9398d599866f814b08856517bc046d7798 (patch)
treef529487478ef505fac49ea7ff9901f7f366954c1 /README.md
parenta14041ae1ad769e72ccbbafa02e2fb65ad0b69bb (diff)
downloadrq-b92bea9398d599866f814b08856517bc046d7798.tar.gz
Update outdated sample codes in README.md
* Use explicit connection management instead of `use_connection()`. * Use `rq worker` instead of `rqworker`.
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/README.md b/README.md
index bf9efaa..5171ee7 100644
--- a/README.md
+++ b/README.md
@@ -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:
@@ -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