From 6073f9e7b632ae2d3859bbf13c211634fff9fdfa Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Fri, 12 Oct 2018 05:51:30 -0700 Subject: [PATCH] datetime ref fix --- lemur/common/celery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lemur/common/celery.py b/lemur/common/celery.py index 8cc02daf..b0280afc 100644 --- a/lemur/common/celery.py +++ b/lemur/common/celery.py @@ -142,8 +142,8 @@ def fetch_all_pending_acme_certs(): for cert in pending_certs: cert_authority = get_authority(cert.authority_id) if cert_authority.plugin_name == 'acme-issuer': - if cert.last_updated == cert.date_created or datetime.datetime.now( - timezone.utc) - cert.last_updated > datetime.timedelta(minutes=3): + if cert.last_updated == cert.date_created or datetime.now( + timezone.utc) - cert.last_updated > timedelta(minutes=3): fetch_acme_cert.delay(cert.id)