mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-02 12:28:11 +08:00
Build improvements (#569)
* Black linting * Adding Black to dev dependencies and upping minimal python to 3.6.2 for compatibility * Updating packages * Removing pip-tools input and exporting requirements with poetry * Deleting old setup files and test runner * Trying 1.3.7 * Looser extras requirements to prevent conflicts * Sorted imports with isort * Added iSort to dev dependencies * Fixes localtime for naive setups
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import pytest
|
||||
import uuid
|
||||
|
||||
from django_q.tasks import async_task
|
||||
import pytest
|
||||
|
||||
from django_q.brokers import get_broker
|
||||
from django_q.cluster import Cluster
|
||||
from django_q.monitor import monitor, info, get_ids
|
||||
from django_q.status import Stat
|
||||
from django_q.conf import Conf
|
||||
from django_q.monitor import get_ids, info, monitor
|
||||
from django_q.status import Stat
|
||||
from django_q.tasks import async_task
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@@ -28,9 +29,9 @@ def test_monitor(monkeypatch):
|
||||
break
|
||||
assert found_c
|
||||
# test lock size
|
||||
monkeypatch.setattr(Conf, 'ORM', 'default')
|
||||
b = get_broker('monitor_test')
|
||||
b.enqueue('test')
|
||||
monkeypatch.setattr(Conf, "ORM", "default")
|
||||
b = get_broker("monitor_test")
|
||||
b.enqueue("test")
|
||||
b.dequeue()
|
||||
assert b.lock_size() == 1
|
||||
monitor(run_once=True, broker=b)
|
||||
@@ -48,4 +49,4 @@ def test_info():
|
||||
|
||||
|
||||
def do_sync():
|
||||
async_task('django_q.tests.tasks.countdown', 1, sync=True, save=True)
|
||||
async_task("django_q.tests.tasks.countdown", 1, sync=True, save=True)
|
||||
|
||||
Reference in New Issue
Block a user