Skip to content

【bug】【fix】启动脚本卡住 #16

@zuocaijian

Description

@zuocaijian

在 start_all.sh 脚本中,通过 curl -s "http://localhost:$WORKER_PORT/health" 检测 worker 是否就绪。如果 curl 命令工具没有安装,就会循环等待,虽然脚本设置了 set -e ,但是当 curl 出现在条件判断位置时,即使命令失败,也不会触发退出。

建议将

if curl -s ... | python3 ...; then 
    ... 
fi`

这种写法改成:

while [ $RETRY -lt $MAX_RETRIES ]; do 
    curl -s ... 
    ... 
    sleep 2 
done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions