refactor(domains): move 15 app-root monoliths into app/domains/ + lazy cloudscraper

This commit is contained in:
Crypto Rug Munch 2026-07-07 22:00:39 +07:00
parent 25e0891a0d
commit 27184c704d
63 changed files with 145 additions and 136 deletions

View file

@ -119,7 +119,7 @@ async def mine_hard_negatives(
# Try RAG search for false positives
try:
from app.rag_service import three_pillar_search
from app.domains.intelligence.rag_service import three_pillar_search
results = await three_pillar_search(
query=query,

View file

@ -91,7 +91,7 @@ async def ingest_via_api(collection: str, content: str, metadata: dict, doc_id:
logger.debug(f"API unavailable ({e}), falling back to direct import")
# Direct import fallback
from app.rag_service import ingest_document
from app.domains.intelligence.rag_service import ingest_document
return await ingest_document(collection, content, metadata, doc_id)

View file

@ -154,7 +154,7 @@ async def ingest_via_api(hacks, dry_run=False):
# Method 2: Direct Python import (run inside Docker)
# ─────────────────────────────────────────────────────────────
async def ingest_direct(hacks, dry_run=False):
from app.rag_service import ingest_document
from app.domains.intelligence.rag_service import ingest_document
success = 0
failed = 0

View file

@ -14,7 +14,7 @@ os.chdir("/root/backend")
import redis.asyncio as redis # noqa: E402
from app.crypto_embeddings import get_embedder # noqa: E402
from app.domains.intelligence.crypto_embeddings import get_embedder # noqa: E402
CSV_PATH = "/root/tools/dark-collection/sigmod-pnd/Data/Telegram/Labeled/pred_pump_message.csv"
REDIS_HOST = os.getenv("REDIS_HOST", "rmi-redis")