mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-22 14:29:36 +02:00
Autostart
This commit is contained in:
parent
425b7b4b3d
commit
be384bd990
1 changed files with 2 additions and 3 deletions
|
@ -7,6 +7,5 @@ class AdventuresConfig(AppConfig):
|
||||||
|
|
||||||
def ready(self):
|
def ready(self):
|
||||||
if settings.SCHEDULER_AUTOSTART:
|
if settings.SCHEDULER_AUTOSTART:
|
||||||
from django.core.management import call_command
|
from .scheduler import start_scheduler
|
||||||
import threading
|
start_scheduler()
|
||||||
threading.Thread(target=call_command, args=('start_scheduler',)).start()
|
|
Loading…
Add table
Add a link
Reference in a new issue