Skip to content

Commit

Permalink
Third benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Apr 23, 2024
1 parent 20069b5 commit facdac5
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/cli/src/benchmark/lib/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ async function prepareWorkflows(owner: User) {
for (const workflow of workflows) {
// @ts-ignore @TODO Fix typing
await Container.get(WorkflowsController).create({ body: workflow, user: owner });
await Container.get(ActiveWorkflowRunner).add(workflow.id as string, 'activate');
// @TODO: Solve race condition when adding webhooks
}

await Container.get(ActiveWorkflowRunner).init();
}

let main: Start;
Expand Down
9 changes: 6 additions & 3 deletions packages/cli/src/benchmark/tasks/webhook.tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ task(
},
);

task('[first] Task 2 should do something else', async () => {
console.log('[first] Task 2 executed');
});
task(
'1.3. Production workflow with authless webhook node using "Using \'Respond to Webhook\' node" mode',
async () => {
await client.get('/webhook/c143e038-b0bd-46ca-9708-33b868499c61');
},
);
2 changes: 1 addition & 1 deletion packages/cli/src/benchmark/workflows/1.1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "1.1",
"active": true,
"nodes": [
{
"parameters": {
Expand All @@ -16,7 +17,6 @@
],
"pinData": {},
"connections": {},
"active": true,
"settings": {
"executionOrder": "v1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/benchmark/workflows/1.2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "1.2",
"active": true,
"nodes": [
{
"parameters": {
Expand Down Expand Up @@ -39,7 +40,6 @@
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
Expand Down
50 changes: 50 additions & 0 deletions packages/cli/src/benchmark/workflows/1.3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "1.3",
"active": true,
"nodes": [
{
"parameters": {
"respondWith": "text",
"responseBody": "Responding from \"Respond to Webhook\" node",
"options": {}
},
"id": "5716bed4-c3b1-40f0-b5cb-62a14e622fcb",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [700, 280]
},
{
"parameters": {
"path": "c143e038-b0bd-46ca-9708-33b868499c61",
"responseMode": "responseNode",
"options": {}
},
"id": "65892623-8bea-42ba-b7ed-d0298f498bce",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [500, 280],
"webhookId": "c143e038-b0bd-46ca-9708-33b868499c61"
}
],
"pinData": {},
"connections": {
"Webhook": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"versionId": "08698a35-a4e4-4630-8b3c-3949e78f8620",
"tags": []
}

0 comments on commit facdac5

Please sign in to comment.