fix(core): Waiting workflows not stopping (#5811)

fix: Waiting workflows not stopping
This commit is contained in:
Val 2023-03-30 10:12:29 +01:00 committed by GitHub
parent 739b9b07f0
commit 744c3fd211
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -165,7 +165,7 @@ export interface IExecutionBase {
// Data in regular format with references // Data in regular format with references
export interface IExecutionDb extends IExecutionBase { export interface IExecutionDb extends IExecutionBase {
data: IRunExecutionData; data: IRunExecutionData;
waitTill?: Date; waitTill?: Date | null;
workflowData?: IWorkflowBase; workflowData?: IWorkflowBase;
} }
@ -179,7 +179,7 @@ export interface IExecutionResponse extends IExecutionBase {
data: IRunExecutionData; data: IRunExecutionData;
retryOf?: string; retryOf?: string;
retrySuccessId?: string; retrySuccessId?: string;
waitTill?: Date; waitTill?: Date | null;
workflowData: IWorkflowBase; workflowData: IWorkflowBase;
} }

View file

@ -124,7 +124,7 @@ export class WaitTracker {
}; };
fullExecutionData.stoppedAt = new Date(); fullExecutionData.stoppedAt = new Date();
fullExecutionData.waitTill = undefined; fullExecutionData.waitTill = null;
fullExecutionData.status = 'canceled'; fullExecutionData.status = 'canceled';
await Db.collections.Execution.update( await Db.collections.Execution.update(

View file

@ -49,7 +49,7 @@ export class ExecutionEntity implements IExecutionFlattedDb {
workflowId: string; workflowId: string;
@Column({ type: datetimeColumnType, nullable: true }) @Column({ type: datetimeColumnType, nullable: true })
waitTill: Date; waitTill: Date | null;
@OneToMany('ExecutionMetadata', 'execution') @OneToMany('ExecutionMetadata', 'execution')
metadata: ExecutionMetadata[]; metadata: ExecutionMetadata[];

View file

@ -1547,7 +1547,7 @@ export interface IRun {
data: IRunExecutionData; data: IRunExecutionData;
finished?: boolean; finished?: boolean;
mode: WorkflowExecuteMode; mode: WorkflowExecuteMode;
waitTill?: Date; waitTill?: Date | null;
startedAt: Date; startedAt: Date;
stoppedAt?: Date; stoppedAt?: Date;
status: ExecutionStatus; status: ExecutionStatus;