mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-10 10:00:56 +08:00
simple test for monitor
This commit is contained in:
@@ -12,16 +12,8 @@ from django_q.core import Stat, RUNNING, STOPPED
|
||||
class Command(BaseCommand):
|
||||
help = "Monitors cluster activity"
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--run-once',
|
||||
action='store_true',
|
||||
dest='run_once',
|
||||
default=False,
|
||||
help='Run once till first stat')
|
||||
|
||||
def handle(self, *args, **options):
|
||||
monitor(run_once=options['run_once'])
|
||||
|
||||
monitor()
|
||||
|
||||
def monitor(run_once=False):
|
||||
term = Terminal()
|
||||
|
||||
Reference in New Issue
Block a user