restic-compose-backup/src/restic_compose_backup/commands/alert.py
2023-03-09 00:56:50 +01:00

15 lines
409 B
Python

from .base import BaseCommand
from restic_compose_backup import alerts
class Command(BaseCommand):
"""Send an alert"""
name = "alert"
def run(self):
"""Test alerts"""
self.logger.info("Testing alerts")
containers = self.get_containers()
alerts.send(
subject="{}: Test Alert".format(containers.project_name),
body="Test message",
)