Update: Refactor to absolute imports, fix QPS limits, and enhance Gitea sync with SQLite support
This commit is contained in:
@@ -10,9 +10,9 @@ from fastapi import APIRouter, HTTPException, UploadFile, File, Depends, Query,
|
||||
from fastapi.responses import FileResponse, JSONResponse
|
||||
from pydantic import BaseModel
|
||||
|
||||
from ..auth.dependencies import get_current_user, get_current_user_flexible
|
||||
from ..config import MAX_UPLOAD_SIZE, ALLOWED_EXTENSIONS
|
||||
from ..services.db_schema import (
|
||||
from web.backend.auth.dependencies import get_current_user, get_current_user_flexible
|
||||
from web.backend.config import MAX_UPLOAD_SIZE, ALLOWED_EXTENSIONS
|
||||
from web.backend.services.db_schema import (
|
||||
insert_file_metadata, query_file_history, query_file_stats,
|
||||
query_file_relations, delete_file_relations, sync_file_relations,
|
||||
query_file_relations_stats, reset_file_cache,
|
||||
@@ -259,7 +259,7 @@ class RelationDeleteRequest(BaseModel):
|
||||
def _cleanup_relation_for_deleted_file(directory: str, filename: str):
|
||||
"""Clean up relation table when a file is deleted."""
|
||||
import sqlite3
|
||||
from ..services.db_schema import _db_path
|
||||
from web.backend.services.db_schema import _db_path
|
||||
try:
|
||||
conn = sqlite3.connect(_db_path)
|
||||
conn.row_factory = sqlite3.Row
|
||||
|
||||
Reference in New Issue
Block a user