import dramatiq from django.core.management import call_command @dramatiq.actor() def send_queued_mail_task(): call_command('send_queued_mail')