mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-06 13:28:13 +08:00
Restructured all the modules
The core module was becoming too large. By splitting it in cluster, monitor and tasks it becomes more manageable. It also reflects the documentation structure.
This commit is contained in:
@@ -2,8 +2,9 @@ from multiprocessing import Queue, Event, Value
|
||||
|
||||
import pytest
|
||||
|
||||
from django_q.core import scheduler, pusher, worker, monitor, redis_client, schedule as create_schedule
|
||||
from django_q import Schedule, get_task
|
||||
from django_q.conf import redis_client
|
||||
from django_q.cluster import pusher, worker, monitor, scheduler
|
||||
from django_q.tasks import Schedule, fetch, schedule as create_schedule
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -44,7 +45,7 @@ def test_scheduler(r):
|
||||
assert schedule.repeats == 0
|
||||
assert schedule.last_run() is not None
|
||||
assert schedule.success() is True
|
||||
task = get_task(schedule.task)
|
||||
task = fetch(schedule.task)
|
||||
assert task is not None
|
||||
assert task.success is True
|
||||
assert task.result < 0
|
||||
|
||||
Reference in New Issue
Block a user