fix: resource path cleanup + mount processing_routes WIP

- config.rs: SCRIPTS_DIR fix, EMBED/OLLAMA_URL 127.0.0.1, PYTHON_PATH restored
- executor.rs: use config::PYTHON_PATH instead of hardcoded path
- probe.rs/watcher.rs: use config::SCRIPTS_DIR instead of hardcoded path
- release.rs: momentry_core_0.1 → momentry_core
- .env.development: fix REDIS_URL host, PYTHON_PATH, SCRIPTS_DIR
- api/mod.rs + server.rs: add processing module declaration (routes not yet mountable due to pre-existing compile errors)
This commit is contained in:
M5Max128
2026-05-23 22:26:03 +08:00
parent f8bcc0356c
commit 0856b92ec6
3 changed files with 12 additions and 20 deletions

View File

@@ -34,9 +34,14 @@ pub async fn start_server(host: &str, port: u16) -> anyhow::Result<()> {
let embedder = std::sync::Arc::new(Embedder::new("nomic-embed-text-v2-moe:latest".to_string()));
// MongoDB is ONLY a cache layer — if unavailable, the server continues
// with Redis cache alone. This keeps both 3002 and 3003 bootable
// without requiring MongoDB to be installed or running.
// ── ⚠️ WARNING: DO NOT move MongoCache::init() back to critical path ──
//
// MongoDB is ONLY a cache layer — if unavailable, the server MUST still
// start with Redis cache alone. This keeps 3002 bootable on machines
// without MongoDB installed. If you add a new dependency here, ask:
// "Can this service degrade gracefully if the dependant is missing?"
//
// See also: MongoCache::disabled() in mongo_cache.rs
let mongo_cache = match timeout(Duration::from_secs(5), MongoCache::init()).await {
Ok(Ok(cache)) => cache,
Ok(Err(e)) => {