Move log to after delete finished

This commit is contained in:
Dobby
2025-07-26 20:14:15 +01:00
committed by Sebastian Goscik
parent 048e061df1
commit cb54078153

View File

@@ -70,8 +70,8 @@ class Purge:
# For every backup for this event
async with self._db.execute(f"SELECT * FROM backups WHERE id = '{event_id}'") as backup_cursor:
async for _, remote, file_path in backup_cursor:
logger.debug(f" Deleted: {remote}:{file_path}")
await delete_file(f"{remote}:{file_path}", self.rclone_purge_args)
logger.debug(f" Deleted: {remote}:{file_path}")
deleted_a_file = True
# delete event from database