This commit is contained in:
2026-04-27 13:23:23 +08:00
parent cf64bc4703
commit 77f0d404fa
2 changed files with 5 additions and 2 deletions

View File

@@ -624,8 +624,9 @@ def compute_storage_stats(base: Path, days: int, keyword_list: Tuple[str, ...])
kw_params = [f"%{k}%" for k in keyword_list]
for channel_id, path in dbs:
conn = sqlite3.connect(str(path))
conn = sqlite3.connect(str(path), timeout=60.0)
try:
conn.execute("PRAGMA busy_timeout=60000")
cur_sql = conn.cursor()
cur_sql.execute("SELECT COUNT(*) FROM messages")
total_all_time += int(cur_sql.fetchone()[0])