- 在 Worker 中引入轻量级 HTTP 服务器,支持健康检查和就绪检查端点。 - 在 Kubernetes 和 Docker 配置中新增健康检查探针,提升服务稳定性。 - 更新依赖,引入 `aiohttp` 用于健康检查服务。 - 优化部署配置,调整 Redis 主机配置和镜像地址以适配新环境。
59 lines
1.2 KiB
TOML
59 lines
1.2 KiB
TOML
[build-system]
|
||
requires = ["setuptools>=65.0", "wheel"]
|
||
build-backend = "setuptools.build_meta"
|
||
|
||
[project]
|
||
name = "functional-scaffold"
|
||
version = "1.0.0"
|
||
description = "算法工程化 Serverless 脚手架"
|
||
requires-python = ">=3.9"
|
||
authors = [
|
||
{name = "FunctionalScaffold Team"}
|
||
]
|
||
readme = "README.md"
|
||
|
||
dependencies = [
|
||
"fastapi>=0.109.0",
|
||
"uvicorn[standard]>=0.27.0",
|
||
"pydantic>=2.5.0",
|
||
"pydantic-settings>=2.0.0",
|
||
"prometheus-client>=0.19.0",
|
||
"python-json-logger>=2.0.7",
|
||
# Redis - 任务队列和指标存储
|
||
"redis>=5.0.0",
|
||
# YAML 配置解析
|
||
"pyyaml>=6.0.0",
|
||
# HTTP 客户端(Webhook 回调)
|
||
"httpx>=0.27.0",
|
||
# 轻量级 HTTP 服务器(Worker 健康检查)
|
||
"aiohttp>=3.9.0",
|
||
]
|
||
|
||
[project.optional-dependencies]
|
||
dev = [
|
||
"pytest>=7.4.0",
|
||
"pytest-asyncio>=0.21.0",
|
||
"pytest-cov>=4.1.0",
|
||
"black>=23.12.0",
|
||
"ruff>=0.1.0",
|
||
]
|
||
|
||
[tool.setuptools.packages.find]
|
||
where = ["src"]
|
||
|
||
[tool.black]
|
||
line-length = 100
|
||
target-version = ['py39']
|
||
|
||
[tool.ruff]
|
||
line-length = 100
|
||
target-version = "py39"
|
||
|
||
[tool.pytest.ini_options]
|
||
testpaths = ["tests"]
|
||
python_files = ["test_*.py"]
|
||
python_classes = ["Test*"]
|
||
python_functions = ["test_*"]
|
||
addopts = "-v --strict-markers"
|
||
pythonpath = ["src"]
|