fix: Backup schedules and pruning
All checks were successful
Deploy to Staging / Build Images (push) Successful in 4m30s
Deploy to Staging / Deploy to Staging (push) Successful in 37s
Deploy to Staging / Verify Staging (push) Successful in 6s
Deploy to Staging / Notify Staging Ready (push) Successful in 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped

This commit is contained in:
Eric Gullickson
2026-01-01 11:40:49 -06:00
parent d8ea0c7297
commit 7f278f6574
7 changed files with 7 additions and 7 deletions

View File

@@ -5,7 +5,7 @@
*/
import { Pool } from 'pg';
import { v4 as uuidv4 } from 'uuid';
import { randomUUID } from 'crypto';
import { logger } from '../../../core/logging/logger';
import { lockService } from '../../../core/config/redis';
import { BackupRepository } from '../data/backup.repository';
@@ -59,7 +59,7 @@ export async function processScheduledBackups(): Promise<ScheduledBackupJobResul
for (const schedule of dueSchedules) {
// Generate unique lock value for this execution
const lockKey = `backup:schedule:${schedule.id}`;
const lockValue = uuidv4();
const lockValue = randomUUID();
// Try to acquire lock for this schedule
const lockAcquired = await lockService.acquireLock(lockKey, BACKUP_LOCK_TTL_SECONDS, lockValue);