refactor(core): Add an option to use simple recovery process by default (#7097)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-09-04 19:58:36 +02:00
committed by GitHub
parent ee36f2d20b
commit cffda65b33
3 changed files with 22 additions and 9 deletions

View File

@@ -216,6 +216,16 @@ export class ExecutionRepository extends Repository<ExecutionEntity> {
return newExecution;
}
async markAsCrashed(executionIds: string[]) {
await this.update(
{ id: In(executionIds) },
{
status: 'crashed',
stoppedAt: new Date(),
},
);
}
async updateExistingExecution(executionId: string, execution: Partial<IExecutionResponse>) {
// Se isolate startedAt because it must be set when the execution starts and should never change.
// So we prevent updating it, if it's sent (it usually is and causes problems to executions that