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
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user