Added logging for when scheduled backup runs

This commit is contained in:
Donkie
2023-07-07 17:37:17 +02:00
parent 66b6770ddd
commit d3a4dcfcf8
2 changed files with 12 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ from fastapi.responses import JSONResponse
from starlette.requests import Request
from starlette.responses import Response
from spoolman.database.database import backup_task
from spoolman.database.database import backup_global_db
from spoolman.exceptions import ItemNotFoundError
from . import filament, models, spool, vendor
@@ -48,7 +48,7 @@ async def health() -> models.HealthCheck:
)
async def backup(): # noqa: ANN201
"""Trigger a database backup."""
path = await backup_task()
path = await backup_global_db()
if path is None:
return JSONResponse(
status_code=500,