refactor: extract admin business logic to services, introduce job queue, add derived index helpers
- Move DB operations from routes/admin.py to services/admin.py (get_logs_context, query_summary_statuses, retry_failed, delete/reset operations) - Add services/jobs.py with Job/JobEvent-based async job queue (create_job, run_job, enqueue_job) - Add services/derived.py with FTS5 reindex and paper index deletion helpers - Refactor scheduler to use job queue instead of direct pipeline calls - Add heartbeat_at/expires_at to TaskLock for lock health tracking - Remove DESIGN_REVIEW.md - Update tests: remove redundant integration tests, add unit tests for new services
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ DATABASE_URL=sqlite:///data/db/papers.db
|
||||
# ─── 语义搜索 ─────────────────────────────
|
||||
CHROMA_ENABLED=false
|
||||
CHROMA_DIR=data/chroma
|
||||
EMBED_API_BASE=https://api.siliconflow.cn/v1/embeddings
|
||||
EMBED_API_BASE=https://api.siliconflow.cn
|
||||
EMBED_API_KEY=your_api_key_here
|
||||
EMBED_MODEL=Qwen/Qwen3-Embedding-4B
|
||||
EMBED_DIMENSIONS=2560
|
||||
|
||||
Reference in New Issue
Block a user