chore(core): Streamline runner debugging (#23854)

This commit is contained in:
Iván Ovejero
2026-01-05 14:09:47 +01:00
committed by GitHub
parent 06eef008b3
commit ce5a626aa8
3 changed files with 17 additions and 4 deletions
+1 -4
View File
@@ -3,9 +3,6 @@ check:
just format-check
just typecheck
run:
uv run python -m src.main
sync:
uv sync --group dev
@@ -42,7 +39,7 @@ debug:
for i in {1..30}; do
GRANT_TOKEN=$(curl -s -X POST http://127.0.0.1:5679/runners/auth -H "Content-Type: application/json" -d '{"token":"test"}' | jq -r '.data.token')
if [ -n "$GRANT_TOKEN" ] && [ "$GRANT_TOKEN" != "null" ]; then
N8N_RUNNERS_GRANT_TOKEN="$GRANT_TOKEN" just run
PYTHONPATH="{{justfile_directory()}}" N8N_RUNNERS_GRANT_TOKEN="$GRANT_TOKEN" uv run python src/main.py
exit 0
fi
[ $i -eq 1 ] && echo "Waiting for n8n task broker server at http://127.0.0.1:5679..."
+1
View File
@@ -5,6 +5,7 @@
"clean": "rimraf dist .turbo",
"start": "node dist/start.js",
"dev": "pnpm build && pnpm start",
"debug": "./scripts/debug.sh",
"typecheck": "tsc --noEmit",
"build": "tsc -p ./tsconfig.build.json && tsc-alias -p tsconfig.build.json",
"format": "biome format --write src",
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# For debugging only, start the runner with a manually fetched grant token. If no broker, wait until available.
for i in {1..30}; do
GRANT_TOKEN=$(curl -s -X POST http://127.0.0.1:5679/runners/auth -H "Content-Type: application/json" -d '{"token":"test"}' | jq -r '.data.token')
if [ -n "$GRANT_TOKEN" ] && [ "$GRANT_TOKEN" != "null" ]; then
N8N_RUNNERS_GRANT_TOKEN="$GRANT_TOKEN" pnpm start
exit 0
fi
[ $i -eq 1 ] && echo "Waiting for n8n task broker server at http://127.0.0.1:5679..."
sleep 1
done
echo "Error: Could not connect to n8n task broker server after 30 seconds"
exit 1