mirror of
https://github.com/n8n-io/n8n.git
synced 2024-08-16 16:40:30 +03:00
fix(core): Clear active execution on cancellation in scaling mode (#9979)
This commit is contained in:
parent
761229e4d2
commit
7e972c78af
@ -235,6 +235,7 @@ describe('ExecutionService', () => {
|
||||
* Assert
|
||||
*/
|
||||
expect(waitTracker.stopExecution).not.toHaveBeenCalled();
|
||||
expect(activeExecutions.stopExecution).toHaveBeenCalled();
|
||||
expect(queue.findRunningJobBy).toBeCalledWith({ executionId: execution.id });
|
||||
expect(queue.stopJob).toHaveBeenCalled();
|
||||
expect(executionRepository.stopDuringRun).toHaveBeenCalled();
|
||||
@ -260,6 +261,7 @@ describe('ExecutionService', () => {
|
||||
* Assert
|
||||
*/
|
||||
expect(waitTracker.stopExecution).toHaveBeenCalledWith(execution.id);
|
||||
expect(activeExecutions.stopExecution).toHaveBeenCalled();
|
||||
expect(queue.findRunningJobBy).toBeCalledWith({ executionId: execution.id });
|
||||
expect(queue.stopJob).toHaveBeenCalled();
|
||||
expect(executionRepository.stopDuringRun).toHaveBeenCalled();
|
||||
|
@ -460,6 +460,10 @@ export class ExecutionService {
|
||||
return await this.stopInRegularMode(execution);
|
||||
}
|
||||
|
||||
if (this.activeExecutions.has(execution.id)) {
|
||||
await this.activeExecutions.stopExecution(execution.id);
|
||||
}
|
||||
|
||||
if (this.waitTracker.has(execution.id)) {
|
||||
await this.waitTracker.stopExecution(execution.id);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user