rq / rq-scheduler

A lightweight library that adds job scheduling capabilities to RQ (Redis Queue)
MIT License
1.45k stars 230 forks source link

Scheduler.acquire_lock returns None instead of False #258

Closed rahfar closed 3 years ago

rahfar commented 3 years ago

During investigating main Scheduler class, found behavior of acquire_lock method, that does not match description:

Example:

from redis import Redis
from rq_scheduler import Scheduler
s = Scheduler(connection=Redis())
s.aquire_lock() # returns True
s.aquire_lock() # returns None instead of False

Environment: rq==1.7.0, rq-scheduler==0.10.0, redis==3.5.3, python3.8, ubuntu 20.04