mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-10 01:00:55 +08:00
Migrate timer status to enum instead of int
This commit is contained in:
@@ -13,6 +13,7 @@ from django.utils.timezone import is_naive
|
||||
|
||||
from django_q.brokers import Broker, get_broker
|
||||
from django_q.conf import Conf
|
||||
from django_q.enums import TimerStatus
|
||||
from django_q.monitor import monitor
|
||||
from django_q.pusher import pusher
|
||||
from django_q.queues import Queue
|
||||
@@ -222,7 +223,7 @@ def test_scheduler(broker, monkeypatch):
|
||||
task_queue.put("STOP")
|
||||
# let a worker handle them
|
||||
result_queue = Queue()
|
||||
worker(task_queue, result_queue, Value("b", -1))
|
||||
worker(task_queue, result_queue, Value("b", TimerStatus.IDLE))
|
||||
assert result_queue.qsize() == 1
|
||||
result_queue.put("STOP")
|
||||
# store the results
|
||||
|
||||
Reference in New Issue
Block a user