Added scheduler

This commit is contained in:
Profitroll 2022-12-20 22:24:46 +01:00
parent 7291faede5
commit 4892916e16
2 changed files with 7 additions and 1 deletions

3
modules/scheduler.py Normal file
View File

@ -0,0 +1,3 @@
from apscheduler.schedulers.asyncio import AsyncIOScheduler
scheduler = AsyncIOScheduler()

View File

@ -1,6 +1,7 @@
from os import makedirs, sep from os import makedirs, sep
from modules.app import app from modules.app import app
from modules.utils import * from modules.utils import *
from modules.scheduler import scheduler
from modules.extensions_loader import dynamic_import_from_src from modules.extensions_loader import dynamic_import_from_src
from fastapi.responses import FileResponse from fastapi.responses import FileResponse
@ -15,3 +16,5 @@ async def favicon():
#================================================================================= #=================================================================================
dynamic_import_from_src("extensions", star_import = True) dynamic_import_from_src("extensions", star_import = True)
#================================================================================= #=================================================================================
scheduler.start()