/usr/share/pyshared/mailer/management/commands/retry_deferred.py is in python-django-mailer 0.2a1.dev3-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import logging
from django.core.management.base import NoArgsCommand
from mailer.models import Message
class Command(NoArgsCommand):
help = "Attempt to resend any deferred mail."
def handle_noargs(self, **options):
logging.basicConfig(level=logging.DEBUG, format="%(message)s")
count = Message.objects.retry_deferred() # @@@ new_priority not yet supported
logging.info("%s message(s) retried" % count)
|