MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / update_generation_timeout

Function update_generation_timeout

src/api/admin.py:1621–1635  ·  view source on GitHub ↗

Update generation timeout configuration

(
    request: GenerationConfigRequest,
    token: str = Depends(verify_admin_token)
)

Source from the content-addressed store, hash-verified

1619
1620@router.post("/api/generation/timeout")
1621async def update_generation_timeout(
1622 request: GenerationConfigRequest,
1623 token: str = Depends(verify_admin_token)
1624):
1625 """Update generation timeout configuration"""
1626 await db.update_generation_config(
1627 image_timeout=request.image_timeout,
1628 video_timeout=request.video_timeout,
1629 max_retries=request.max_retries,
1630 )
1631
1632 # 🔥 Hot reload: sync database config to memory
1633 await db.reload_config_to_memory()
1634
1635 return {"success": True, "message": "生成配置更新成功"}
1636
1637
1638# ========== AT Auto Refresh Config ==========

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected