refactor(core): Include logless case in crash recovery (no-changelog) (#9725)

This commit is contained in:
Iván Ovejero
2024-06-13 12:54:51 +02:00
committed by GitHub
parent 28d1a5d00d
commit cfef49e60a
4 changed files with 227 additions and 239 deletions

View File

@@ -260,7 +260,9 @@ export class ExecutionRepository extends Repository<ExecutionEntity> {
return String(executionId);
}
async markAsCrashed(executionIds: string[]) {
async markAsCrashed(executionIds: string | string[]) {
if (!Array.isArray(executionIds)) executionIds = [executionIds];
await this.update(
{ id: In(executionIds) },
{
@@ -268,6 +270,10 @@ export class ExecutionRepository extends Repository<ExecutionEntity> {
stoppedAt: new Date(),
},
);
this.logger.info('[Execution Recovery] Marked executions as `crashed`', {
executionIds,
});
}
/**