Skip to content

Commit

Permalink
add an option to skip using statistics events
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed Feb 10, 2023
1 parent 7ff46a0 commit e058165
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
shell: bash
env:
N8N_ENCRYPTION_KEY: ${{secrets.ENCRYPTION_KEY}}
SKIP_STATISTICS_EVENTS: true
# -
# name: Export credentials
# if: always()
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/events/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { eventEmitter } from 'n8n-core';
import { nodeFetchedData, workflowExecutionCompleted } from './WorkflowStatistics';

export function initEvents() {
if ('SKIP_STATISTICS_EVENTS' in process.env) return;

// Check for undefined as during testing these functions end up undefined for some reason
if (nodeFetchedData) {
eventEmitter.on(eventEmitter.types.nodeFetchedData, nodeFetchedData);
Expand Down

0 comments on commit e058165

Please sign in to comment.