1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-20 21:39:37 +02:00
AdventureLog/backend/server/adventures/apps.py

12 lines
420 B
Python
Raw Normal View History

2024-07-08 11:44:39 -04:00
from django.apps import AppConfig
2024-08-21 09:48:47 -04:00
from django.conf import settings
2024-07-08 11:44:39 -04:00
class AdventuresConfig(AppConfig):
2024-08-21 09:48:47 -04:00
default_auto_field = 'django.db.models.BigAutoField'
name = 'adventures'
def ready(self):
if settings.SCHEDULER_AUTOSTART:
2024-08-21 10:00:58 -04:00
from django.core.management import call_command
import threading
threading.Thread(target=call_command, args=('start_scheduler',)).start()