mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
fix: skip backups if in_progress
This commit is contained in:
@@ -160,6 +160,11 @@ const executeBackup = async (scheduleId: number, manual = false) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (schedule.lastBackupStatus === "in_progress") {
|
||||||
|
logger.info(`Backup schedule ${scheduleId} is already in progress. Skipping execution.`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const volume = await db.query.volumesTable.findFirst({
|
const volume = await db.query.volumesTable.findFirst({
|
||||||
where: eq(volumesTable.id, schedule.volumeId),
|
where: eq(volumesTable.id, schedule.volumeId),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user