From a912c3488deac5750c4c63b80e869389a271c594 Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Fri, 12 Oct 2018 07:25:58 -0700 Subject: [PATCH] python fix to retrigger tests --- 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 b7a0da5a..d3986351 100644 --- a/lemur/common/celery.py +++ b/lemur/common/celery.py @@ -11,7 +11,6 @@ import copy import sys from datetime import datetime, timezone, timedelta -import arrow from celery import Celery from flask import current_app @@ -157,7 +156,7 @@ def remove_old_acme_certs(): # Delete pending certs more than a week old for cert in pending_certs: - if arrow.utcnow() - cert.last_updated > timedelta(days=7): + if datetime.now(timezone.utc) - cert.last_updated > timedelta(days=7): log_data['pending_cert_id'] = cert.id log_data['pending_cert_name'] = cert.name log_data['message'] = "Deleting pending certificate"