feat(queue): 增加非文本模型分布式准入队列
使用 PostgreSQL 统一同步与异步非文本任务的并发准入、持久化等待和 Worker 容量分配,并将生产 API 与独立 Worker 角色拆分。 补充策略管理、共享契约、OpenAPI、Kubernetes 双节点 Worker 清单及跨节点验收脚本;未默认启用任何生产 queue_size 策略。 已在原基线完成 Go、前端、迁移、Shell、Kustomize 与长任务容量验收;合入最新主干后将重新执行发布门禁。
This commit is contained in:
@@ -95,6 +95,18 @@ kubectl='k3s kubectl'
|
||||
--field-selector=status.phase=Running --no-headers | wc -l) -eq 2 ]]
|
||||
[[ $($kubectl get pods -n easyai -l app.kubernetes.io/name=easyai-web \
|
||||
--field-selector=status.phase=Running --no-headers | wc -l) -eq 2 ]]
|
||||
[[ $($kubectl get pods -n easyai -l app.kubernetes.io/name=easyai-worker \
|
||||
--field-selector=status.phase=Running --no-headers | wc -l) -eq 2 ]]
|
||||
for site in ningbo hongkong; do
|
||||
[[ $($kubectl get deployment "easyai-api-$site" -n easyai \
|
||||
-o jsonpath='{.status.readyReplicas}') -eq 1 ]]
|
||||
[[ $($kubectl get deployment "easyai-worker-$site" -n easyai \
|
||||
-o jsonpath='{.status.readyReplicas}') -eq 1 ]]
|
||||
[[ $($kubectl get deployment "easyai-api-$site" -n easyai \
|
||||
-o jsonpath='{.spec.template.spec.containers[0].env[?(@.name=="AI_GATEWAY_PROCESS_ROLE")].value}') == api ]]
|
||||
[[ $($kubectl get deployment "easyai-worker-$site" -n easyai \
|
||||
-o jsonpath='{.spec.template.spec.containers[0].env[?(@.name=="AI_GATEWAY_PROCESS_ROLE")].value}') == worker ]]
|
||||
done
|
||||
images=$($kubectl get deployments -n easyai -o json |
|
||||
jq -r '.items[] | select(.metadata.name | startswith("easyai-")) |
|
||||
.spec.template.spec.containers[].image')
|
||||
@@ -112,7 +124,7 @@ printf 'applications=ready\n'
|
||||
REMOTE
|
||||
)
|
||||
[[ $application_state == applications=ready ]]
|
||||
echo 'application_acceptance=PASS api=2 web=2 digests=pinned'
|
||||
echo 'application_acceptance=PASS api=2 worker=2 web=2 roles=isolated digests=pinned'
|
||||
|
||||
for edge_ip in "${CLUSTER_NINGBO_HOST#*@}" "${CLUSTER_HONGKONG_HOST#*@}"; do
|
||||
health_body=$(curl -fsS --max-time 10 --resolve "ai.51easyai.com:443:$edge_ip" \
|
||||
|
||||
Reference in New Issue
Block a user