fix: pre_chunks schema + TMDb movie name extraction

- pre_chunks: add chunk_type, text_content columns; drop NOT NULL on
  coordinate_type/coordinate_index (INSERT statements reference these
  columns but CREATE TABLE was missing them)
- run_migrations: add ALTER TABLE for existing databases
- extract_movie_name: filter noise words (youtube, fps, 24fps, 1080p,
  pure digits) so 'Charade_YouTube_24fps' → 'Charade'
- run-server-3002.sh: add companion worker startup (matching 3003 script)
This commit is contained in:
Accusys
2026-06-22 11:55:12 +08:00
parent f4de741d5b
commit 30b252ac95
3 changed files with 57 additions and 3 deletions

View File

@@ -21,6 +21,17 @@ if [ -n "$PID" ]; then
sleep 2
fi
# 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..."
@@ -32,3 +43,11 @@ echo "Starting momentry server on port 3002..."
./target/release/momentry server --host 0.0.0.0 --port 3002 > logs/momentry_3002.log 2>&1 &
echo "Server started (PID: $!)"
echo "Logs: logs/momentry_3002.log"
# Start companion worker
echo "Starting momentry worker..."
nohup ./target/release/momentry worker --max-concurrent 6 --poll-interval 10 --batch-size 5 > 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"