Files
Django_TasksApp/main/planner/management/commands/notify_fasting_phases.py
T

12 lines
413 B
Python

from django.core.management.base import BaseCommand
from planner.services.fasting_notifications import notify_fasting_phase_changes
class Command(BaseCommand):
help = 'Send ntfy notifications for fasting and eating phase changes.'
def handle(self, *args, **options):
delivered = notify_fasting_phase_changes()
self.stdout.write(f'Delivered {delivered} fasting phase notification(s).')