refactor(core): Make executions pruning more resilient (#7480)
This PR converts the hard-deletion interval to a timeout: - to prevent the interval from not being restored when hard deletion throws, and - to prevent a long-running hard deletion from leading to duplicate deletions.
This commit is contained in:
@@ -9,7 +9,7 @@ import type { ExecutionRepository } from '../../../src/databases/repositories';
|
||||
import type { ExecutionEntity } from '../../../src/databases/entities/ExecutionEntity';
|
||||
import { TIME } from '../../../src/constants';
|
||||
|
||||
describe('ExecutionRepository.prune()', () => {
|
||||
describe('softDeleteOnPruningCycle()', () => {
|
||||
const now = new Date();
|
||||
const yesterday = new Date(Date.now() - TIME.DAY);
|
||||
let executionRepository: ExecutionRepository;
|
||||
|
||||
Reference in New Issue
Block a user