Add APScheduler dependency and fix scheduler endpoint

This commit is contained in:
Christian 2026-01-02 02:28:33 +01:00
parent ebf3b1f31c
commit 1b84bee868
3 changed files with 28 additions and 19 deletions

View File

@ -1 +1 @@
1.3.73 1.3.74

View File

@ -481,6 +481,7 @@ async def get_scheduler_status():
""" """
Get backup scheduler status and job information Get backup scheduler status and job information
""" """
try:
from app.backups.backend.scheduler import backup_scheduler from app.backups.backend.scheduler import backup_scheduler
if not backup_scheduler.running: if not backup_scheduler.running:
@ -503,3 +504,10 @@ async def get_scheduler_status():
"running": backup_scheduler.running, "running": backup_scheduler.running,
"jobs": jobs "jobs": jobs
} }
except Exception as e:
logger.warning("Scheduler not available: %s", str(e))
return {
"enabled": settings.BACKUP_ENABLED,
"running": False,
"message": f"Scheduler error: {str(e)}"
}

View File

@ -9,3 +9,4 @@ jinja2==3.1.4
aiohttp==3.10.10 aiohttp==3.10.10
msal==1.31.1 msal==1.31.1
paramiko==3.4.1 paramiko==3.4.1
apscheduler==3.10.4