mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-08 01:08:12 +08:00
adds --info summary to monitor command
This commit is contained in:
@@ -4,7 +4,7 @@ from optparse import make_option
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from django_q.monitor import monitor
|
||||
from django_q.monitor import monitor, info
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
@@ -17,7 +17,16 @@ class Command(BaseCommand):
|
||||
dest='run_once',
|
||||
default=False,
|
||||
help='Run once and then stop.'),
|
||||
make_option('-i', '--info',
|
||||
action='store_true',
|
||||
dest='info',
|
||||
default=False,
|
||||
help='Lists general information over all clusters. ')
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
monitor(run_once=options.get('run_once', False))
|
||||
if options.get('info', False):
|
||||
info()
|
||||
else:
|
||||
monitor(run_once=options.get('run_once', False))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user