refactor(core): Move more typeorm operators to repositories (no-changelog) (#8143)
Follow-up to #8139
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Service } from 'typedi';
|
||||
import { LessThan } from 'typeorm';
|
||||
import { DateTime } from 'luxon';
|
||||
import { WorkflowHistoryRepository } from '@db/repositories/workflowHistory.repository';
|
||||
import { WORKFLOW_HISTORY_PRUNE_INTERVAL } from './constants';
|
||||
@@ -38,8 +37,6 @@ export class WorkflowHistoryManager {
|
||||
}
|
||||
const pruneDateTime = DateTime.now().minus({ hours: pruneHours }).toJSDate();
|
||||
|
||||
await this.workflowHistoryRepo.delete({
|
||||
createdAt: LessThan(pruneDateTime),
|
||||
});
|
||||
await this.workflowHistoryRepo.deleteEarlierThan(pruneDateTime);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user