Skip to content

Commit facdac5

Browse files
committed
Third benchmark
1 parent 20069b5 commit facdac5

File tree

5 files changed

+60
-7
lines changed

5 files changed

+60
-7
lines changed

packages/cli/src/benchmark/lib/hooks.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ async function prepareWorkflows(owner: User) {
6363
for (const workflow of workflows) {
6464
// @ts-ignore @TODO Fix typing
6565
await Container.get(WorkflowsController).create({ body: workflow, user: owner });
66-
await Container.get(ActiveWorkflowRunner).add(workflow.id as string, 'activate');
67-
// @TODO: Solve race condition when adding webhooks
6866
}
67+
68+
await Container.get(ActiveWorkflowRunner).init();
6969
}
7070

7171
let main: Start;

packages/cli/src/benchmark/tasks/webhook.tasks.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ task(
2626
},
2727
);
2828

29-
task('[first] Task 2 should do something else', async () => {
30-
console.log('[first] Task 2 executed');
31-
});
29+
task(
30+
'1.3. Production workflow with authless webhook node using "Using \'Respond to Webhook\' node" mode',
31+
async () => {
32+
await client.get('/webhook/c143e038-b0bd-46ca-9708-33b868499c61');
33+
},
34+
);

packages/cli/src/benchmark/workflows/1.1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "1.1",
3+
"active": true,
34
"nodes": [
45
{
56
"parameters": {
@@ -16,7 +17,6 @@
1617
],
1718
"pinData": {},
1819
"connections": {},
19-
"active": true,
2020
"settings": {
2121
"executionOrder": "v1"
2222
},

packages/cli/src/benchmark/workflows/1.2.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "1.2",
3+
"active": true,
34
"nodes": [
45
{
56
"parameters": {
@@ -39,7 +40,6 @@
3940
]
4041
}
4142
},
42-
"active": false,
4343
"settings": {
4444
"executionOrder": "v1"
4545
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "1.3",
3+
"active": true,
4+
"nodes": [
5+
{
6+
"parameters": {
7+
"respondWith": "text",
8+
"responseBody": "Responding from \"Respond to Webhook\" node",
9+
"options": {}
10+
},
11+
"id": "5716bed4-c3b1-40f0-b5cb-62a14e622fcb",
12+
"name": "Respond to Webhook",
13+
"type": "n8n-nodes-base.respondToWebhook",
14+
"typeVersion": 1.1,
15+
"position": [700, 280]
16+
},
17+
{
18+
"parameters": {
19+
"path": "c143e038-b0bd-46ca-9708-33b868499c61",
20+
"responseMode": "responseNode",
21+
"options": {}
22+
},
23+
"id": "65892623-8bea-42ba-b7ed-d0298f498bce",
24+
"name": "Webhook",
25+
"type": "n8n-nodes-base.webhook",
26+
"typeVersion": 2,
27+
"position": [500, 280],
28+
"webhookId": "c143e038-b0bd-46ca-9708-33b868499c61"
29+
}
30+
],
31+
"pinData": {},
32+
"connections": {
33+
"Webhook": {
34+
"main": [
35+
[
36+
{
37+
"node": "Respond to Webhook",
38+
"type": "main",
39+
"index": 0
40+
}
41+
]
42+
]
43+
}
44+
},
45+
"settings": {
46+
"executionOrder": "v1"
47+
},
48+
"versionId": "08698a35-a4e4-4630-8b3c-3949e78f8620",
49+
"tags": []
50+
}

0 commit comments

Comments
 (0)