From d0884be9296cf2cba2428d5d90cdeda65a550296 Mon Sep 17 00:00:00 2001 From: Chyroc Date: Fri, 5 Jul 2019 11:44:28 +0800 Subject: [PATCH] otp: reuse utcnow (#1115) --- rq/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)