summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChyroc <chyroc@qq.com>2019-07-05 11:44:28 +0800
committerSelwin Ong <selwin.ong@gmail.com>2019-07-05 10:44:28 +0700
commitd0884be9296cf2cba2428d5d90cdeda65a550296 (patch)
tree1cc57a654dcfeed1fdecd6f0b84fae54c65c7703
parentf9d42e8a177eb4356cc5dc29de6a4f410127ed1f (diff)
downloadrq-d0884be9296cf2cba2428d5d90cdeda65a550296.tar.gz
otp: reuse utcnow (#1115)
-rw-r--r--rq/worker.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rq/worker.py b/rq/worker.py
index d93c5ff..a321205 100644
--- a/rq/worker.py
+++ b/rq/worker.py
@@ -261,7 +261,7 @@ class Worker(object):
with self.connection.pipeline() as p:
p.delete(key)
now = utcnow()
- now_in_string = utcformat(utcnow())
+ now_in_string = utcformat(now)
self.birth_date = now
p.hset(key, 'birth', now_in_string)
p.hset(key, 'last_heartbeat', now_in_string)