Avoid colliding LetsEncrypt jobs
This commit is contained in:
parent
a2b22a7d09
commit
6f0005c78e
|
@ -142,8 +142,7 @@ 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.now(
|
if datetime.now(timezone.utc) - cert.last_updated > timedelta(minutes=5):
|
||||||
timezone.utc) - cert.last_updated > timedelta(minutes=5):
|
|
||||||
fetch_acme_cert.delay(cert.id)
|
fetch_acme_cert.delay(cert.id)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue