From 1de4b1d5cd46c8d031dcb010ed77c7adc0cd07bb Mon Sep 17 00:00:00 2001 From: Marcelo Jorge Vieira Date: Mon, 4 Mar 2019 15:13:47 -0300 Subject: [PATCH] AttributeError: 'int' object has no attribute 'iteritems' (Closes #156) --- pyres/__init__.py | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyres/__init__.py b/pyres/__init__.py index 011cd88..fa0ea0f 100644 --- a/pyres/__init__.py +++ b/pyres/__init__.py @@ -300,7 +300,7 @@ def enqueue_at_from_string(self, datetime, klass_as_string, queue, *args, **kwar def delayed_push(self, datetime, item): key = int(time.mktime(datetime.timetuple())) self.redis.rpush('resque:delayed:%s' % key, ResQ.encode(item)) - self.redis.zadd('resque:delayed_queue_schedule', key, key) + self.redis.zadd('resque:delayed_queue_schedule', {key: key}) def delayed_queue_peek(self, start, count): return [int(item) for item in self.redis.zrange( diff --git a/requirements.txt b/requirements.txt index 96046b5..657f348 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ simplejson>3.0 -redis>2.4.12 +redis>3.2.0 setproctitle>1.0