fix(admin): use task_name column (not task_type) in _is_generating query

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-02-24 10:24:53 +01:00
parent ff170d94ff
commit 6bd92c69ce

View File

@@ -1722,7 +1722,7 @@ async def _get_article_stats() -> dict:
async def _is_generating() -> bool: async def _is_generating() -> bool:
"""Return True if a generate_articles task is currently pending.""" """Return True if a generate_articles task is currently pending."""
row = await fetch_one( row = await fetch_one(
"SELECT COUNT(*) AS cnt FROM tasks WHERE task_type = 'generate_articles' AND status = 'pending'" "SELECT COUNT(*) AS cnt FROM tasks WHERE task_name = 'generate_articles' AND status = 'pending'"
) )
return bool(row and row["cnt"] > 0) return bool(row and row["cnt"] > 0)