- 产品编辑入口统一走 ProductFormFull(卖点/风格/人群/品牌词全字段); 修复开任务页 <form> 套 <form> 致"编辑产品"报错、改不了、跳回首个产品 - dashboard 入口卡片对齐实际路由: 系统管理(/config) 与 工作配置(/settings) 分开; settings ?tab=products 直达改用挂载后读 URL, 消除 hydration mismatch - 新增用户管理(users API/admin service/改密页) + alembic 022/023/024 - 上线部署: Dockerfile / docker-compose.prod+https / nginx https / .env.example - A8 三套正交叙事(痛点/场景/成分背书) + beige 调色去AI化 + 飞轮 text_import 高权重信号 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
45 lines
1.1 KiB
Python
45 lines
1.1 KiB
Python
"""Task 端到端真跑临时验证脚本。
|
||
|
||
手动运行:
|
||
cd backend && python3 test_3sets_e2e.py
|
||
"""
|
||
import sys
|
||
|
||
sys.path.insert(0, "/app")
|
||
|
||
|
||
def main():
|
||
from app.core.database import SessionLocal
|
||
from app.models.task import GenerationTask
|
||
from app.constants.enums import TaskStatus
|
||
from app.workers.tasks import run_generation_pipeline
|
||
|
||
db = SessionLocal()
|
||
try:
|
||
task = GenerationTask(
|
||
workspace_id=3,
|
||
product_id=1,
|
||
operator_id=3,
|
||
theme="伪素颜·黄黑皮提亮·3套正交",
|
||
text_count=1,
|
||
image_count=2,
|
||
track="ai",
|
||
need_product_image=True,
|
||
status=TaskStatus.PENDING,
|
||
)
|
||
db.add(task)
|
||
db.commit()
|
||
db.refresh(task)
|
||
task_id = task.id
|
||
print(f"建task成功 task_id={task_id} image_count=2 (期望3套×2=6张)")
|
||
finally:
|
||
db.close()
|
||
|
||
print(f"=== 同步执行 run_generation_pipeline({task_id}) ===")
|
||
result = run_generation_pipeline.apply(args=[task_id]).get()
|
||
print(f"=== 结果: {result} ===")
|
||
|
||
|
||
if __name__ == "__main__":
|
||
main()
|