mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-06 13:38:12 +08:00
simple test for monitor
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
from django_q.core import Cluster
|
||||
from django_q.management.commands.qmonitor import monitor
|
||||
|
||||
|
||||
def test_monitor():
|
||||
c = Cluster()
|
||||
c.start()
|
||||
stats = monitor(run_once=True)
|
||||
c.stop()
|
||||
assert len(stats) > 0
|
||||
assert stats[0].cluster_id == c.pid
|
||||
Reference in New Issue
Block a user