Skip to content
This repository was archived by the owner on Jun 5, 2023. It is now read-only.

Commit 3ec8d17

Browse files
committed
when getting delayed timestamps, limit the query to one result since
only the first item in that list is ever used
1 parent 91abd48 commit 3ec8d17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyres/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def delayed_timestamp_size(self, timestamp):
314314
def next_delayed_timestamp(self):
315315
key = int(time.mktime(ResQ._current_time().timetuple()))
316316
array = self.redis.zrangebyscore('resque:delayed_queue_schedule',
317-
'-inf', key)
317+
'-inf', key, start=0, num=1)
318318
timestamp = None
319319
if array:
320320
timestamp = array[0]

0 commit comments

Comments
 (0)