only throw in dev and test mode

This commit is contained in:
Danny Martini 2024-09-17 12:40:26 +02:00
parent 2b06cb91c7
commit 3a7afbd481
No known key found for this signature in database

View file

@ -27,6 +27,7 @@ import { isWorkflowIdValid } from '@/utils';
import { ConcurrencyControlService } from './concurrency/concurrency-control.service'; import { ConcurrencyControlService } from './concurrency/concurrency-control.service';
import config from './config'; import config from './config';
import { inProduction } from './constants';
@Service() @Service()
export class ActiveExecutions { export class ActiveExecutions {
@ -217,7 +218,7 @@ export class ActiveExecutions {
private getExecution(executionId: string): IExecutingWorkflowData { private getExecution(executionId: string): IExecutingWorkflowData {
const execution = this.activeExecutions[executionId]; const execution = this.activeExecutions[executionId];
if (!execution) { if (!execution && !inProduction) {
throw new ApplicationError('No active execution found', { extra: { executionId } }); throw new ApplicationError('No active execution found', { extra: { executionId } });
} }
return execution; return execution;