backups: email the administrator when there's a problem

Refactor by moving the email-the-admin code out of the status checks and into a new separate tool.

This is why I suppressed non-error output of the backups last commit - so it doesn't send a daily email.
This commit is contained in:
Joshua Tauberer
2016-01-04 18:43:02 -05:00
parent 89a46089ee
commit 5033042b8c
4 changed files with 68 additions and 36 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
# This script is run daily (at 3am each night).
# Take a backup.
management/backup.py
management/backup.py | management/email_administrator.py "Backup Status"
# Run status checks and email the administrator if anything changed.
management/status_checks.py --show-changes --smtp
management/status_checks.py --show-changes | management/email_administrator.py "Status Checks Change Notice"