Update apps.py

This commit is contained in:
Fixelx
2026-07-01 00:05:31 +02:00
committed by GitHub
parent f656ad3d1f
commit d26c4ce5c7
+10
View File
@@ -1,9 +1,19 @@
from django.apps import AppConfig
class InvoicesConfig(AppConfig):
name = "invoices"
def ready(self):
import sys
if any(cmd in sys.argv for cmd in ("migrate", "makemigrations", "shell", "test")):
return
from django.db import connection
if "django_apscheduler_djangojob" not in connection.introspection.table_names():
return
from django_apscheduler.jobstores import DjangoJobStore
from apscheduler.schedulers.background import BackgroundScheduler
from . import scheduler