auto-sync: 2026-05-21 08:27:07
This commit is contained in:
@@ -31,9 +31,13 @@ async def list_projects():
|
||||
if db_path.exists():
|
||||
try:
|
||||
conn = sqlite3.connect(str(db_path), timeout=5)
|
||||
count = conn.execute("SELECT COUNT(*) FROM tasks").fetchone()[0]
|
||||
total = conn.execute("SELECT COUNT(*) FROM tasks WHERE status != 'cancelled'").fetchone()[0]
|
||||
active = conn.execute("SELECT COUNT(*) FROM tasks WHERE status NOT IN ('cancelled','done') AND COALESCE(archived,0)=0").fetchone()[0]
|
||||
archived = total - active
|
||||
conn.close()
|
||||
info['task_count'] = count
|
||||
info['task_count'] = active
|
||||
info['task_count_total'] = total
|
||||
info['task_count_archived'] = archived
|
||||
except Exception:
|
||||
pass
|
||||
# 虚拟项目 _general:如果 blackboard.db 存在则插入
|
||||
|
||||
Reference in New Issue
Block a user