mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-03 01:18:12 +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:
+3
-3
@@ -1,11 +1,11 @@
|
||||
"""Provides task functionality."""
|
||||
# Standard
|
||||
from multiprocessing import Value
|
||||
from time import sleep, time
|
||||
|
||||
# django
|
||||
from django.db import IntegrityError
|
||||
from django.utils import timezone
|
||||
from multiprocessing import Value
|
||||
|
||||
# local
|
||||
from django_q.brokers import get_broker
|
||||
@@ -153,7 +153,7 @@ def result(task_id, wait=0, cached=Conf.CACHED):
|
||||
|
||||
def result_cached(task_id, wait=0, broker=None):
|
||||
"""
|
||||
Return the result from the cache backend
|
||||
Return the result from the cache backend
|
||||
"""
|
||||
if not broker:
|
||||
broker = get_broker()
|
||||
@@ -755,7 +755,7 @@ class AsyncTask:
|
||||
|
||||
def _sync(pack):
|
||||
"""Simulate a package travelling through the cluster."""
|
||||
from django_q.cluster import worker, monitor
|
||||
from django_q.cluster import monitor, worker
|
||||
|
||||
task_queue = Queue()
|
||||
result_queue = Queue()
|
||||
|
||||
Reference in New Issue
Block a user