落地 docs/网关摘除隔离期实施方案.md(9·19 worker 磁盘满事故第 3 层防线): - pool.py: WorkerState.offline_until + _cooldown_seconds();mark_worker_unhealthy 摘除时设隔离截止时刻,隔离期内探测成功也不复活(_try_revive 守卫) - pool.py: 删除从未被调用的死代码 _check_worker_health/_mark_failure - config.py + config.example.json: health_check.cooldown_seconds(默认 60,0=关闭) - tests/test_gateway_pool.py: 9 用例(摘除设隔离/隔离内不复活/期满复活/整链路等) 网关机已重启验证:启动日志含"隔离期=60s",/gateway-health 正常。
28 lines
674 B
JSON
28 lines
674 B
JSON
{
|
|
"workers": [
|
|
"http://127.0.0.1:28187",
|
|
"http://127.0.0.1:28188"
|
|
],
|
|
"shared_password": "REPLACE_ME_ROTATE_PERIODICALLY",
|
|
"public_base_url": "https://hair.xiangsilian.com",
|
|
"static_dir": "static/annotations",
|
|
"health_check": {
|
|
"path": "/health",
|
|
"interval_seconds": 8,
|
|
"timeout_seconds": 3,
|
|
"unhealthy_threshold": 2,
|
|
"healthy_threshold": 1,
|
|
"cooldown_seconds": 60
|
|
},
|
|
"ark_api_key": "",
|
|
"dispatch": {
|
|
"per_worker_concurrency": 1,
|
|
"max_global_concurrency": 1,
|
|
"max_queue_wait_seconds": 590,
|
|
"queue_wait_seconds": 30,
|
|
"request_timeout_seconds": 600,
|
|
"retry_on_failure": true,
|
|
"max_retries": 1
|
|
}
|
|
}
|