n8n/packages/cli/src/events/index.ts

8 lines
432 B
TypeScript
Raw Normal View History

import { eventEmitter } from 'n8n-core';
import { nodeFetchedData, workflowExecutionCompleted } from './WorkflowStatistics';
// Check for undefined as during testing these functions end up undefined for some reason
if (nodeFetchedData) eventEmitter.on(eventEmitter.types.nodeFetchedData, nodeFetchedData);
if (workflowExecutionCompleted)
eventEmitter.on(eventEmitter.types.workflowExecutionCompleted, workflowExecutionCompleted);