feat(market-data): 优化同步并增加完整性检查

This commit is contained in:
yuxuanhui
2026-08-11 11:20:13 +08:00
parent 3ce186f977
commit 7ce11543af
42 changed files with 4837 additions and 197 deletions
+16
View File
@@ -0,0 +1,16 @@
import pytest
from pydantic import ValidationError
from zhixing_server.bootstrap.config import Settings
def test_market_data_workers_default_to_eight(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.delenv("ZHIXING_MARKET_DATA_MAX_WORKERS", raising=False)
settings = Settings()
assert settings.market_data_max_workers == 8
def test_market_data_workers_must_be_positive() -> None:
with pytest.raises(ValidationError):
Settings(market_data_max_workers=0)