1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-22 14:29:36 +02:00
AdventureLog/backend/server/adventures/apps.py
2024-08-21 10:00:58 -04:00

12 lines
No EOL
420 B
Python

from django.apps import AppConfig
from django.conf import settings
class AdventuresConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'adventures'
def ready(self):
if settings.SCHEDULER_AUTOSTART:
from django.core.management import call_command
import threading
threading.Thread(target=call_command, args=('start_scheduler',)).start()