mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-10 10:00:56 +08:00
Initial work on fix for #424 - TypeError: can't pickle _thread.lock objects.
Made `Broker` and `Queue` classes pickable which fixes the the problem with new default `spawn` proces start method.
This commit is contained in:
+9
-1
@@ -12,7 +12,15 @@ from time import sleep
|
||||
import arrow
|
||||
|
||||
# Django
|
||||
from django import db
|
||||
from django import db, core
|
||||
from django.apps.registry import apps
|
||||
|
||||
try:
|
||||
apps.check_apps_ready()
|
||||
except core.exceptions.AppRegistryNotReady:
|
||||
import django
|
||||
django.setup()
|
||||
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
Reference in New Issue
Block a user