mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
feat: backup in progress status
This commit is contained in:
@@ -25,7 +25,7 @@ const backupScheduleSchema = type({
|
||||
excludePatterns: "string[] | null",
|
||||
includePatterns: "string[] | null",
|
||||
lastBackupAt: "number | null",
|
||||
lastBackupStatus: "'success' | 'error' | null",
|
||||
lastBackupStatus: "'success' | 'error' | 'in_progress' | null",
|
||||
lastBackupError: "string | null",
|
||||
nextBackupAt: "number | null",
|
||||
createdAt: "number",
|
||||
|
||||
@@ -181,6 +181,11 @@ const executeBackup = async (scheduleId: number, manual = false) => {
|
||||
|
||||
logger.info(`Starting backup for volume ${volume.name} to repository ${repository.name}`);
|
||||
|
||||
await db
|
||||
.update(backupSchedulesTable)
|
||||
.set({ lastBackupStatus: "in_progress", updatedAt: Date.now() })
|
||||
.where(eq(backupSchedulesTable.id, scheduleId));
|
||||
|
||||
try {
|
||||
const volumePath = getVolumePath(volume.name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user