Improve 8092 cache loading and SQLite stability

This commit is contained in:
2026-06-09 10:12:15 +09:00
parent 6ac0964618
commit 54def57e99
3 changed files with 161 additions and 60 deletions

View File

@@ -18,7 +18,7 @@ class ProjectCodeViewerHandler(base.Handler):
if __name__ == '__main__':
os.makedirs(base.BASE_DIR, exist_ok=True)
try:
with sqlite3.connect(base.DB_PATH, timeout=30) as conn:
with base.open_db_connection() as conn:
base.init_db(conn)
except sqlite3.OperationalError as error:
if 'locked' in str(error).lower():