n8n
Version:
n8n Workflow Automation Tool
18 lines (17 loc) • 1.11 kB
TypeScript
/// <reference types="node" />
import { IDeferredPromise, IExecuteResponsePromiseData, IRun } from 'n8n-workflow';
import { ChildProcess } from 'child_process';
import * as PCancelable from 'p-cancelable';
import { IExecutionsCurrentSummary, IWorkflowExecutionDataProcess } from '.';
export declare class ActiveExecutions {
private activeExecutions;
add(executionData: IWorkflowExecutionDataProcess, process?: ChildProcess, executionId?: string): Promise<string>;
attachWorkflowExecution(executionId: string, workflowExecution: PCancelable<IRun>): void;
attachResponsePromise(executionId: string, responsePromise: IDeferredPromise<IExecuteResponsePromiseData>): void;
resolveResponsePromise(executionId: string, response: IExecuteResponsePromiseData): void;
remove(executionId: string, fullRunData?: IRun): void;
stopExecution(executionId: string, timeout?: string): Promise<IRun | undefined>;
getPostExecutePromise(executionId: string): Promise<IRun | undefined>;
getActiveExecutions(): IExecutionsCurrentSummary[];
}
export declare function getInstance(): ActiveExecutions;