Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Commit

Permalink
Remoe optional arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstegelman committed Mar 18, 2017
1 parent 4f31ce6 commit 172a55e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions mailqueue/management/commands/clear_sent_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@ class Command(BaseCommand):

def add_arguments(self, parser):
# Positional arguments
parser.add_argument('offset', type=int)

# Named (optional) arguments
parser.add_argument('--offset',
action='store_true',
dest='offset',
default=False,
help='Only clear messages that are more than this many hours old')
parser.add_argument('offset', nargs="?", type=int)

def handle(self, *args, **options):
MailerMessage.objects.clear_sent_messages(offset=options['offset'])

0 comments on commit 172a55e

Please sign in to comment.