X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=patchwork%2Fmanagement%2Fcommands%2Fcron.py;h=7c00ea36d72018e2e1dae69f918e83adf03c26d6;hb=544b8bbcc7ec80d94c96f181886c51b177530a95;hp=308b4b26ea7b6229d1de3fad510b19053f9a8323;hpb=ac63b6b3564186191928044528e2afda862b7bc0;p=patchwork diff --git a/patchwork/management/commands/cron.py b/patchwork/management/commands/cron.py index 308b4b2..7c00ea3 100755 --- a/patchwork/management/commands/cron.py +++ b/patchwork/management/commands/cron.py @@ -1,14 +1,15 @@ -from django.core.management.base import BaseCommand, CommandError +from django.core.management.base import BaseCommand from patchwork.utils import send_notifications, do_expiry + class Command(BaseCommand): - help = ('Run periodic patchwork functions: send notifications and ' + help = ('Run periodic patchwork functions: send notifications and ' 'expire unused users') def handle(self, *args, **kwargs): errors = send_notifications() for (recipient, error) in errors: self.stderr.write("Failed sending to %s: %s" % - (recipient.email, error)) + (recipient.email, error)) do_expiry()