mirror of
https://github.com/n8n-io/n8n
synced 2026-05-10 13:32:23 +02:00
16 lines
641 B
Bash
Executable File
16 lines
641 B
Bash
Executable File
#!/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
|