datetime ref fix

This commit is contained in:
Curtis Castrapel 2018-10-12 05:51:30 -07:00
parent 4b3d458dba
commit 6073f9e7b6
1 changed files with 2 additions and 2 deletions

View File

@ -142,8 +142,8 @@ def fetch_all_pending_acme_certs():
for cert in pending_certs: for cert in pending_certs:
cert_authority = get_authority(cert.authority_id) cert_authority = get_authority(cert.authority_id)
if cert_authority.plugin_name == 'acme-issuer': if cert_authority.plugin_name == 'acme-issuer':
if cert.last_updated == cert.date_created or datetime.datetime.now( if cert.last_updated == cert.date_created or datetime.now(
timezone.utc) - cert.last_updated > datetime.timedelta(minutes=3): timezone.utc) - cert.last_updated > timedelta(minutes=3):
fetch_acme_cert.delay(cert.id) fetch_acme_cert.delay(cert.id)