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:
@@ -23,8 +23,8 @@ MONGODB_URL=mongodb://localhost:27017
|
||||
MONGODB_DATABASE=momentry_dev
|
||||
|
||||
# Redis (already isolated via prefix)
|
||||
REDIS_URL=redis://:accusys@localhost:6379
|
||||
REDIS_PASSWORD=accusys
|
||||
REDIS_URL=redis://127.0.0.1:6379
|
||||
# REDIS_PASSWORD not set - Redis has no password configured
|
||||
|
||||
# Qdrant Vector Database - Collection isolation
|
||||
QDRANT_URL=http://localhost:6333
|
||||
@@ -37,8 +37,8 @@ MOMENTRY_BACKUP_DIR=/Users/accusys/momentry/backup/momentry_dev
|
||||
MOMENTRY_SFTP_ROOT=/Users/accusys/momentry/var/sftpgo/data/demo/
|
||||
|
||||
# Python (for processing scripts)
|
||||
MOMENTRY_PYTHON_PATH=/opt/homebrew/bin/python3.11
|
||||
MOMENTRY_SCRIPTS_DIR=/Users/accusys/momentry_core_0.1/scripts
|
||||
MOMENTRY_PYTHON_PATH=/Users/accusys/momentry_core/venv/bin/python
|
||||
MOMENTRY_SCRIPTS_DIR=/Users/accusys/momentry_core/scripts
|
||||
|
||||
# Logging
|
||||
RUST_LOG=debug
|
||||
|
||||
@@ -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)) => {
|
||||
|
||||
@@ -132,19 +132,6 @@ pub static SYSTEM_TIMEZONE: Lazy<String> = Lazy::new(|| {
|
||||
pub static MONGODB_DATABASE: Lazy<String> =
|
||||
Lazy::new(|| env::var("MONGODB_DATABASE").unwrap_or_else(|_| "momentry".to_string()));
|
||||
|
||||
pub static EMBED_URL: Lazy<String> =
|
||||
Lazy::new(|| env::var("MOMENTRY_EMBED_URL").unwrap_or_else(|_| "http://localhost:11436".to_string()));
|
||||
|
||||
pub static OLLAMA_URL: Lazy<String> =
|
||||
Lazy::new(|| env::var("MOMENTRY_OLLAMA_URL").unwrap_or_else(|_| "http://localhost:11434".to_string()));
|
||||
|
||||
/// LLM health endpoint derived from CHAT_URL.
|
||||
/// e.g. "http://127.0.0.1:8082/v1/chat/completions" → "http://127.0.0.1:8082/health"
|
||||
pub static LLM_HEALTH_URL: Lazy<String> = Lazy::new(|| {
|
||||
let chat = llm::CHAT_URL.clone();
|
||||
chat.trim_end_matches("/v1/chat/completions").to_string() + "/health"
|
||||
});
|
||||
|
||||
pub static QDRANT_COLLECTION: Lazy<String> =
|
||||
Lazy::new(|| env::var("QDRANT_COLLECTION").unwrap_or_else(|_| "momentry_rule1".to_string()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user