409e92d6ae
Dependency Compatibility Check / Fresh Install Dependency Check (push) Waiting to run
Build and Publish n8n Docker Image / test-image (push) Blocked by required conditions
Build and Publish n8n Docker Image / build-and-push (push) Waiting to run
Build and Publish n8n Docker Image / create-release (push) Blocked by required conditions
Build and Push Docker Images / Build Docker Image (push) Has been cancelled
Build and Push Docker Images / Build Railway Docker Image (push) Has been cancelled
Automated Release / Detect Version Change (push) Waiting to run
Automated Release / Generate Release Notes (push) Blocked by required conditions
Automated Release / Create GitHub Release (push) Blocked by required conditions
Automated Release / Package MCPB Bundle (push) Blocked by required conditions
Automated Release / Build and Verify (push) Blocked by required conditions
Automated Release / Publish to NPM (push) Blocked by required conditions
Automated Release / Build and Push Docker Images (push) Blocked by required conditions
Secret Scan / secretlint (push) Waiting to run
Test Suite / test (push) Waiting to run
Test Suite / cjs-runtime (push) Waiting to run
Test Suite / publish-results (push) Blocked by required conditions
Automated Release / Update Documentation (push) Blocked by required conditions
Automated Release / Notify Release Completion (push) Blocked by required conditions
72 lines
1.7 KiB
TypeScript
72 lines
1.7 KiB
TypeScript
#!/usr/bin/env npx tsx
|
|
/**
|
|
* Debug workflow tracking in telemetry manager
|
|
*/
|
|
|
|
import { TelemetryManager } from '../src/telemetry/telemetry-manager';
|
|
|
|
// Get the singleton instance
|
|
const telemetry = TelemetryManager.getInstance();
|
|
|
|
const testWorkflow = {
|
|
nodes: [
|
|
{
|
|
id: 'webhook1',
|
|
type: 'n8n-nodes-base.webhook',
|
|
name: 'Webhook',
|
|
position: [0, 0],
|
|
parameters: {
|
|
path: '/test-' + Date.now(),
|
|
httpMethod: 'POST'
|
|
}
|
|
},
|
|
{
|
|
id: 'http1',
|
|
type: 'n8n-nodes-base.httpRequest',
|
|
name: 'HTTP Request',
|
|
position: [250, 0],
|
|
parameters: {
|
|
url: 'https://api.example.com/data',
|
|
method: 'GET'
|
|
}
|
|
},
|
|
{
|
|
id: 'slack1',
|
|
type: 'n8n-nodes-base.slack',
|
|
name: 'Slack',
|
|
position: [500, 0],
|
|
parameters: {
|
|
channel: '#general',
|
|
text: 'Workflow complete!'
|
|
}
|
|
}
|
|
],
|
|
connections: {
|
|
'webhook1': {
|
|
main: [[{ node: 'http1', type: 'main', index: 0 }]]
|
|
},
|
|
'http1': {
|
|
main: [[{ node: 'slack1', type: 'main', index: 0 }]]
|
|
}
|
|
}
|
|
};
|
|
|
|
console.log('🧪 Testing Workflow Tracking\n');
|
|
console.log('Workflow has', testWorkflow.nodes.length, 'nodes');
|
|
|
|
// Track the workflow
|
|
console.log('Calling trackWorkflowCreation...');
|
|
telemetry.trackWorkflowCreation(testWorkflow, true);
|
|
|
|
console.log('Waiting for async processing...');
|
|
|
|
// Wait for setImmediate to process
|
|
setTimeout(async () => {
|
|
console.log('\nForcing flush...');
|
|
await telemetry.flush();
|
|
console.log('✅ Flush complete!');
|
|
|
|
console.log('\nWorkflow should now be in the telemetry_workflows table.');
|
|
console.log('Check with: SELECT * FROM telemetry_workflows ORDER BY created_at DESC LIMIT 1;');
|
|
}, 2000);
|