799ede5a0e
- Rule 1 now creates OCR-only chunks instead of merging into ASRX - generate_seed_embeddings.py supports --file-uuid parameter - get_seeds() filters by file_uuid - identity_matcher.py uses file_uuid for seed matching - Push QDRANT_API_KEY to Python subprocesses - Face clustering uses frame+bbox matching instead of face_id - Portal uses JWT authentication - FilesView filter logic fixed
43 lines
1.2 KiB
Bash
Executable File
43 lines
1.2 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
|
|
|
|
# Kill existing worker via PID file
|
|
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)"
|
|
kill "$WPID" 2>/dev/null || true
|
|
sleep 1
|
|
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" |