mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-04 07:18:11 +08:00
moved static methods to module functions
medic is now sentinel and runs in it's own process sentinel shutdown procedure more stable
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import time
|
||||
|
||||
# simple countdown
|
||||
def count(n):
|
||||
def countdown(n):
|
||||
start_time = time.time()
|
||||
while n > 0:
|
||||
n -= 1
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
import sys, os
|
||||
myPath = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.insert(0, myPath + '/../')
|
||||
|
||||
import pytest
|
||||
from django_q import Cluster
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def qworker():
|
||||
@pytest.fixture(scope='session')
|
||||
def cluster():
|
||||
return Cluster()
|
||||
|
||||
|
||||
def test_worker(qworker):
|
||||
assert len(qworker.stable) == qworker.stable_size
|
||||
def test_worker(cluster):
|
||||
assert len(cluster.stable) == cluster.stable_size
|
||||
|
||||
Reference in New Issue
Block a user