Working mail alerts + alert system tweaks

This commit is contained in:
Einar Forselv
2019-12-04 19:36:14 +01:00
parent 26ea7a2a00
commit a4a8a2f462
5 changed files with 79 additions and 35 deletions

View File

@@ -1,14 +1,14 @@
from restic_compose_backup.alerts import ALERT_INFO, ALERT_ERROR, ALERT_TYPES
class BaseAlert:
name = None
def __init__(self):
pass
def create_from_env(self):
return None
def create_from_config(self, config):
pass
@property
def properly_configured(self) -> bool:
return False
def send(self, self, subject=None, attachment=None, alert_type=ALERT_ERROR):
def send(self, subject: str = None, body: str = None, alert_type: str = None):
pass