safer reissue, fix celery sync job

This commit is contained in:
Curtis Castrapel 2018-10-29 13:22:50 -07:00
parent f824f76d9c
commit 50761d9d3b
2 changed files with 12 additions and 2 deletions

View File

@ -238,7 +238,17 @@ def reissue(old_certificate_name, commit):
if not old_cert:
for certificate in get_all_pending_reissue():
request_reissue(certificate, commit)
try:
request_reissue(certificate, commit)
except Exception as e:
sentry.captureException()
current_app.logger.exception(
"Error reissuing certificate: {}".format(certificate.name), exc_info=True)
print(
"[!] Failed to reissue certificates. Reason: {}".format(
e
)
)
else:
request_reissue(old_cert, commit)

View File

@ -210,4 +210,4 @@ def sync_source(source):
:return:
"""
current_app.logger.debug("Syncing source {}".format(source))
sync([source], True)
sync([source])