Fix for "apps not ready" in Windows and Mac (#116)

This commit is contained in:
Stan Triepels
2023-10-09 22:04:32 +02:00
committed by GitHub
parent bc50219141
commit 54ab399758
5 changed files with 46 additions and 17 deletions
+9
View File
@@ -3,7 +3,16 @@ from multiprocessing.process import current_process
from multiprocessing.queues import Queue
from time import sleep
from django import core
from django.utils.translation import gettext_lazy as _
from django.apps.registry import apps
try:
apps.check_apps_ready()
except core.exceptions.AppRegistryNotReady:
import django
django.setup()
from django_q.brokers import Broker, get_broker
from django_q.conf import Conf, logger