From 6f0005c78e21f08983bedb4482403b61e1d1bd41 Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Fri, 9 Nov 2018 10:31:27 -0800 Subject: [PATCH] Avoid colliding LetsEncrypt jobs --- lemur/common/celery.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lemur/common/celery.py b/lemur/common/celery.py index 69bd9ce1..13f3c46b 100644 --- a/lemur/common/celery.py +++ b/lemur/common/celery.py @@ -142,8 +142,7 @@ 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.now( - timezone.utc) - cert.last_updated > timedelta(minutes=5): + if datetime.now(timezone.utc) - cert.last_updated > timedelta(minutes=5): fetch_acme_cert.delay(cert.id)