diff --git a/docs/docs/workers.md b/docs/docs/workers.md index 6294f754..d19451fe 100644 --- a/docs/docs/workers.md +++ b/docs/docs/workers.md @@ -116,19 +116,15 @@ A simple implementation example: ```python #!/usr/bin/env python -import sys -from rq import Connection, Worker +from redis import Redis +from rq import Worker # Preload libraries import library_that_you_want_preloaded -# Provide queue names to listen to as arguments to this script, -# similar to rq worker -with Connection(): - qs = sys.argv[1:] or ['default'] - - w = Worker(qs) - w.work() +# Provide the worker with the list of queues (str) to listen to. +w = Worker(['default'], connection=Redis()) +w.work() ```