后端: - 新增 Scheduler + ScheduledTask 核心模块(croniter 解析 cron 表达式) - 新增 Schedule 数据模型(alembic 0016) - 新增 /api/v1/admin/schedules CRUD 接口 - lifespan 启动时注册默认定时任务并加载数据库配置 - 默认任务:每日比赛/积分榜/30分钟统计回填(默认禁用) 前端: - 设置页新增「定时任务」管理区块 - 支持:新建/启用禁用/立即执行/删除定时任务 - 显示:任务ID、类型、cron表达式、上次执行时间/状态 依赖:新增 croniter>=2.0 Co-Authored-By: new-provider/LongCat-2.0 <<EMAIL>>
38 lines
809 B
TOML
38 lines
809 B
TOML
[project]
|
|
name = "profeto"
|
|
version = "0.1.0"
|
|
description = "足球数据 + LLM 预测服务"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"fastapi>=0.110",
|
|
"uvicorn[standard]>=0.29",
|
|
"pydantic>=2.7",
|
|
"pydantic-settings>=2.3",
|
|
"SQLAlchemy>=2.0",
|
|
"asyncpg>=0.29",
|
|
"psycopg2-binary>=2.9",
|
|
"httpx>=0.27",
|
|
"alembic>=1.13",
|
|
"cryptography>=42.0",
|
|
"croniter>=2.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
# 开发/CI 依赖:本地安装用 pip install -e ".[dev]",CI 用 pip-sync requirements-dev.txt
|
|
dev = [
|
|
"pytest>=8.0",
|
|
"pytest-asyncio>=0.23",
|
|
"pip-tools>=7.0",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src"]
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|