变更内容: - 优化任务出队逻辑,采用 BLMOVE 提升队列操作的原子性和可靠性。 - 在 JobManager 中新增任务锁续租、超时任务回收、ACK/NACK 状态管理功能。 - 实现任务队列和死信队列监控指标收集,为系统性能分析提供数据支持。 - 扩展 Worker 模块,增加锁续租逻辑及任务回收调度。 - 更新测试用例,覆盖任务管理和队列指标的新增逻辑。 - 补充 metrics.yaml 文件,添加队列相关的监控指标定义。 - 更新依赖,补充 Redis 支持及相关库版本规范。
57 lines
1.2 KiB
TOML
57 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",
|
||
]
|
||
|
||
[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"]
|