[#29] 完成proxy到web/grafana/prom/alert,遗留web 列表也信息获取不到
This commit is contained in:
20
src/web/build_tools/proxy/start-proxy-retry.sh
Normal file
20
src/web/build_tools/proxy/start-proxy-retry.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
MAX=${RETRY_MAX:-10}
|
||||
DELAY=${RETRY_DELAY:-10}
|
||||
ATTEMPT=1
|
||||
|
||||
echo "[INFO] proxy retry wrapper: max=${MAX}, delay=${DELAY}s"
|
||||
|
||||
while [ "$ATTEMPT" -le "$MAX" ]; do
|
||||
echo "[INFO] starting proxy attempt ${ATTEMPT}/${MAX}"
|
||||
/usr/local/bin/start-proxy-supervised.sh && exit 0 || true
|
||||
echo "[WARN] proxy exited (attempt ${ATTEMPT}/${MAX}); sleeping ${DELAY}s before retry"
|
||||
sleep "$DELAY"
|
||||
ATTEMPT=$((ATTEMPT+1))
|
||||
done
|
||||
|
||||
echo "[ERROR] proxy failed after ${MAX} attempts"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user