feat: overhaul UI styling, improve templates, enhance services and tests
This commit is contained in:
+6
-2
@@ -74,7 +74,9 @@ async def admin_crawl(
|
||||
db.commit()
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(status_code=409, detail=f"Crawl already running for {target_date}")
|
||||
raise HTTPException(
|
||||
status_code=409, detail=f"Crawl already running for {target_date}"
|
||||
)
|
||||
|
||||
try:
|
||||
result = await crawl_daily(db, target_date)
|
||||
@@ -96,7 +98,9 @@ async def admin_summarize_batch(
|
||||
"""批量总结所有 pending 论文。"""
|
||||
result = await summarize_batch(db)
|
||||
if result.get("status") == "conflict":
|
||||
raise HTTPException(status_code=409, detail=result.get("error", "batch already running"))
|
||||
raise HTTPException(
|
||||
status_code=409, detail=result.get("error", "batch already running")
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user