Browse Source

log inconsistency warning email

forest-wip
forest 2 years ago
parent
commit
f74a361c5f
  1. 5
      capsulflask/cli.py

5
capsulflask/cli.py

@ -268,6 +268,11 @@ def ensure_vms_and_db_are_synced():
if len(errors) > 0:
email_addresses_raw = current_app.config['ADMIN_EMAIL_ADDRESSES'].split(",")
email_addresses = list(filter(lambda x: len(x) > 6, map(lambda x: x.strip(), email_addresses_raw ) ))
current_app.logger.info(f"cron_task: sending inconsistency warning email to {','.join(email_addresses)}:")
for error in errors:
current_app.logger.info(f"cron_task: {error}.")
current_app.config["FLASK_MAIL_INSTANCE"].send(
Message(
"Capsul Consistency Check Failed",

Loading…
Cancel
Save