diff --git a/modules/scheduler.py b/modules/scheduler.py new file mode 100644 index 0000000..0ec4214 --- /dev/null +++ b/modules/scheduler.py @@ -0,0 +1,3 @@ +from apscheduler.schedulers.asyncio import AsyncIOScheduler + +scheduler = AsyncIOScheduler() \ No newline at end of file diff --git a/photos_api.py b/photos_api.py index 1dc98ca..b464449 100644 --- a/photos_api.py +++ b/photos_api.py @@ -1,6 +1,7 @@ from os import makedirs, sep from modules.app import app from modules.utils import * +from modules.scheduler import scheduler from modules.extensions_loader import dynamic_import_from_src from fastapi.responses import FileResponse @@ -14,4 +15,6 @@ async def favicon(): #================================================================================= dynamic_import_from_src("extensions", star_import = True) -#================================================================================= \ No newline at end of file +#================================================================================= + +scheduler.start() \ No newline at end of file