1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-23 06:49:37 +02:00

Auto schedule Django APScheduler

This commit is contained in:
Sean Morley 2024-08-21 09:48:47 -04:00
parent f5e721cd82
commit 590fa9edc0
5 changed files with 82 additions and 18 deletions

View file

@ -1,6 +1,11 @@
from django.apps import AppConfig
from django.conf import settings
class AdventuresConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "adventures"
default_auto_field = 'django.db.models.BigAutoField'
name = 'adventures'
def ready(self):
if settings.SCHEDULER_AUTOSTART:
from .scheduler import start_scheduler
start_scheduler()