882e31ab96
Consolidated snapshot (previously WIP in working tree). - core/pipeline_config: new module loading config/pipeline_flows.json as the source of truth for stage execution mode (parallel/blocking) and dependencies - worker/job_worker: dispatch Scene VLM to a background task when the stage is declared parallel, unblocking the worker poll loop; resolve processor dependencies from pipeline_flows.json (fallback to built-in) - config/pipeline_flows.json: asrx depends on [cut, asr] - scripts/fix_stuck_jobs: fix UTC timezone comparison, raise default threshold to 6h, skip jobs with recent processor activity - rust_asrx: Rust speaker diarization CLI + processor wiring - processor metadata helper; fast_face_clustering script; file_progress pipeline API; scan API; VAD updates
58 lines
2.0 KiB
Bash
Executable File
58 lines
2.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Start production worker on port 3002
|
|
# Logs to logs/worker_3002.log
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
cd "$SCRIPT_DIR"
|
|
|
|
mkdir -p logs
|
|
|
|
# Production environment variables
|
|
export MOMENTRY_OUTPUT_DIR=/Users/accusys/momentry/output
|
|
export DATABASE_SCHEMA=public
|
|
export MOMENTRY_REDIS_PREFIX=momentry:
|
|
# Qdrant credentials for Python subprocesses
|
|
export QDRANT_URL=http://127.0.0.1:6333
|
|
export QDRANT_API_KEY=Test3200Test3200Test3200
|
|
|
|
# LLM/VLM configuration for Python subprocesses
|
|
# Note: VLM now uses Gemma4 on port 8080 (Llava on 8091 is deprecated)
|
|
export MOMENTRY_LLM_VISION_URL=http://localhost:8080/v1/chat/completions
|
|
export MOMENTRY_LLM_VISION_MODEL=gemma-4-12b-it
|
|
export MOMENTRY_LLM_CHAT_URL=http://localhost:8080/v1/chat/completions
|
|
export MOMENTRY_LLM_CHAT_MODEL=gemma-4-12b-it
|
|
export MOMENTRY_LLM_SUMMARY_URL=http://localhost:8080/v1/chat/completions
|
|
export MOMENTRY_LLM_SUMMARY_MODEL=gemma-4-12b-it
|
|
export MOMENTRY_EMBEDDING_URL=http://localhost:11436/v1/embeddings
|
|
export MOMENTRY_EMBEDDING_MODEL=embeddinggemma-300m
|
|
|
|
# Kill existing worker and all child processes (prevent orphans)
|
|
if [ -f logs/worker_3002.pid ]; then
|
|
WPID=$(cat logs/worker_3002.pid)
|
|
if kill -0 "$WPID" 2>/dev/null; then
|
|
echo "Killing existing worker (PID: $WPID) and child processes..."
|
|
# Kill child processes first, then parent
|
|
pkill -P "$WPID" 2>/dev/null || true
|
|
kill "$WPID" 2>/dev/null || true
|
|
sleep 1
|
|
# Kill any lingering children
|
|
pkill -P "$WPID" 2>/dev/null || true
|
|
fi
|
|
rm -f logs/worker_3002.pid
|
|
fi
|
|
|
|
# Build if needed
|
|
if [ ! -f target/release/momentry ]; then
|
|
echo "Building release binary..."
|
|
cargo build --release --bin momentry
|
|
fi
|
|
|
|
# Start worker
|
|
echo "Starting momentry worker (DATABASE_SCHEMA=${DATABASE_SCHEMA})..."
|
|
nohup ./target/release/momentry worker > logs/worker_3002.log 2>&1 &
|
|
WPID=$!
|
|
echo "$WPID" > logs/worker_3002.pid
|
|
echo "Worker started (PID: $WPID)"
|
|
echo "Worker logs: logs/worker_3002.log" |