31d1b4050f
- Changed min_confidence from 50.0 to 0.5 (Vision uses 0.0-1.0 range) - Changed min_size from 32 to 1 (was filtering out all small faces) - Changed min_capture_quality from 25.0 to 0.25 - Fixes issue where all videos showed 0 faces detected Root cause: admin_config.rs used wrong defaults (50.0/32) instead of config.rs constants (0.5/1), causing Vision framework to filter out ALL faces because confidence threshold exceeded valid range. Verified: IMG_9449 now correctly detects 191 faces (was 0).
57 lines
1.9 KiB
Bash
Executable File
57 lines
1.9 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
|
|
export MOMENTRY_LLM_VISION_URL=http://localhost:8091/v1/chat/completions
|
|
export MOMENTRY_LLM_VISION_MODEL=llava-v1.6-vicuna-13b
|
|
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" |