Documentation needs update. queue vs queue_name
jgerry2002 opened this issue · comments
In the example:
scheduler = Scheduler(queue=queue)
This will return errors regarding connectivity to redis, when in fact it the option argument is now queue_name vs queue.
When I tested:
scheduler = Scheduler(queue_name=queue)
Everything worked as it should.
@jgerry2002 I tried this and wasn't able to get it to work. When I try to run it with a normal queue, it works perfectly fine and I can add jobs to the queue, but with the scheduler, I get an error. This is my code:
from redis import Redis
from rq import Queue
from rq_scheduler import Scheduler
rq = Queue(connection=Redis(host=BaseConfig.REDIS_HOST, port=BaseConfig.REDIS_PORT))
rqs = Scheduler(queue_name=rq)
And I'm still getting a NoRedisConnectionException: Could not resolve a Redis connection
error.
Added an additional example in this commit that will hopefully clarify things a bit more: ee60c19