cmsmanage/membershipworks/management/commands/send_event_survey_emails.py
Adam Goldsmith dcf483d19e
All checks were successful
Ruff / ruff (push) Successful in 29s
Test / test (push) Successful in 3m55s
membershipworks: Automatically send survey emails to event attendees
2024-05-23 19:20:01 -04:00

18 lines
499 B
Python

import logging
from django.core.management.base import BaseCommand
from membershipworks.tasks.event_survey_emails import logger, send_survey_emails
class Command(BaseCommand):
def handle(self, *args, verbosity: int, **options):
verbosity_levels = {
0: logging.ERROR,
1: logging.WARNING,
2: logging.INFO,
3: logging.DEBUG,
}
logger.setLevel(verbosity_levels.get(verbosity, logging.WARNING))
send_survey_emails()