Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GRPC_PORT=50050
GRPC_ENABLED=true

# 量产 gRPC
SOMNI_GRPC_PORT=50051
SOMNI_GRPC_PORT=50055
SOMNI_GRPC_ENABLED=true

# Elasticsearch(功能手板)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- **核心**:三维度音频检索(ES 召回 + 标签词典向量 + 精排)
- **功能手板**:`MONGO_*` + `ES_NODE` + `REDIS_URL`;HTTP `:8080` + gRPC `:50050`
- **量产**:`SOMNI_MONGO_*` + `SOMNI_ES_*` + `SOMNI_REDIS_URL`;gRPC `:50051`
- **量产**:`SOMNI_MONGO_*` + `SOMNI_ES_*` + `SOMNI_REDIS_URL`;gRPC `:50055`
- **写路径**:直连 Mongo,再同步本侧 ES(不再调用 BioNode)
- **接口文档**:`docs/功能手板接口文档.md`、`docs/量产接口文档.md`

Expand All @@ -15,7 +15,7 @@
├── HTTP :8080 ──► app/api/audio ──► server/handboard(Fullive)
├── gRPC :50050 ─► uburnode.v1(手板 audio/quiz)
└── gRPC :50051 ─► uburnode.somni.v1(量产 ListTags/ListAudios/Search/GetAnswer)
└── gRPC :50055 ─► uburnode.somni.v1(量产 ListTags/ListAudios/Search/GetAnswer)
```

## 目录结构
Expand Down
2 changes: 1 addition & 1 deletion app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Settings(BaseSettings):
grpc_enabled: bool = True

# 量产 gRPC
somni_grpc_port: int = 50051
somni_grpc_port: int = 50055
somni_grpc_enabled: bool = True

es_node: str = "http://localhost:9200"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
REDIS_URL: redis://redis:6379/0
ports:
- "50050:50050" # 功能手板 gRPC
- "50051:50051" # 量产 gRPC
- "50055:50055" # 量产 gRPC
# HTTP 仍经 nginx :8001
volumes:
- hf_cache:/data/huggingface
Expand Down
2 changes: 1 addition & 1 deletion tests/test_grpc_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async def test_start_both_servers_when_enabled(monkeypatch: pytest.MonkeyPatch)
fake_hb.add_insecure_port = MagicMock(return_value=50050)
fake_hb.start = AsyncMock()
fake_sm = MagicMock()
fake_sm.add_insecure_port = MagicMock(return_value=50051)
fake_sm.add_insecure_port = MagicMock(return_value=50055)
fake_sm.start = AsyncMock()
servers = iter([fake_hb, fake_sm])
monkeypatch.setattr(
Expand Down