mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-29 06:38:12 +08:00
12 lines
260 B
Python
12 lines
260 B
Python
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
|