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

Commit

Permalink
Management command fix for issue #92
Browse files Browse the repository at this point in the history
  • Loading branch information
dstegelman committed Mar 15, 2017
1 parent 6770e63 commit 315d5a6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/source/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can use this management command to send email if you do not
setup a cron job or use celery. You can specify a limit on the
amount of emails you want to attempt to send at one time.::

python manage.py send_queued_messages --limit=20
python manage.py send_queued_messages 20


Clear Sent messages
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
version = '3.0.0'
version = '3.0.1'
# The full version, including alpha/beta/rc tags.
release = '3.0.0'
release = '3.0.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion mailqueue/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION = '3.0.0'
VERSION = '3.0.1'

default_app_config = 'mailqueue.apps.MailQueueConfig'
9 changes: 1 addition & 8 deletions mailqueue/management/commands/send_queued_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('limit', nargs='+', type=int)

# Named (optional) arguments
parser.add_argument('--limit',
action='store_true',
dest='limit',
default=False,
help='Limit the number of emails to process')
parser.add_argument('limit', nargs='?', type=int)

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

0 comments on commit 315d5a6

Please sign in to comment.