Update project configuration files, and API routes accordingly. Add SQLite runtime file ignores to .gitignore for better file management.
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
# ╔══════════════════════════════════════════════════════════════════╗
|
||||
# ║ ║
|
||||
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀ ║
|
||||
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█ ║
|
||||
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀ ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ |H|e|x|a|H|o|s|t| ║
|
||||
# ║ +-+-+-+-+-+-+-+-+ ║
|
||||
# ║ ║
|
||||
# ║ © 2026 CodeX Devs — All Rights Reserved ║
|
||||
# ║ © 2026 HexaHost — All Rights Reserved ║
|
||||
# ║ ║
|
||||
# ║ discord ── https://discord.gg/codexdev ║
|
||||
# ║ youtube ── https://youtube.com/@CodeXDevs ║
|
||||
# ║ github ── https://github.com/RayExo ║
|
||||
# ║ discord ── https://discord.gg/hexahost ║
|
||||
# ║ github ── https://github.com/theoneandonlymace ║
|
||||
# ║ ║
|
||||
# ╚══════════════════════════════════════════════════════════════════╝
|
||||
|
||||
@@ -16,6 +15,8 @@ import aiosqlite
|
||||
import asyncio
|
||||
from typing import Dict
|
||||
|
||||
from utils.db_paths import resolve_db_path
|
||||
|
||||
class DatabaseManager:
|
||||
"""
|
||||
A simple manager for persistent SQLite connections to avoid
|
||||
@@ -29,6 +30,7 @@ class DatabaseManager:
|
||||
"""
|
||||
Retrieves an existing connection or creates a new one for the given path.
|
||||
"""
|
||||
db_path = resolve_db_path(db_path)
|
||||
async with self._lock:
|
||||
if db_path not in self._connections:
|
||||
# We use check_same_thread=False because aiosqlite handles
|
||||
|
||||
Reference in New Issue
Block a user