diff --git a/scripts/podx-tools.sh b/scripts/podx-tools.sh index 5e51d98..db0117b 100755 --- a/scripts/podx-tools.sh +++ b/scripts/podx-tools.sh @@ -346,10 +346,15 @@ OpenWebUI: owui-batch-attach "" # attach all files matching glob Transcription control: + scan-once # run a single library scan to enqueue new files transcribe-status # show whether transcription workers are paused transcribe-pause # pause CPU-heavy transcription jobs transcribe-resume # resume transcription jobs +RQ helpers: + rq-info # show RQ queue summary via worker container + rq-transcribe-requeue # requeue all failed 'transcribe' jobs back to active + Queues (Redis): queues-workers-list # show worker queue sizes (LLEN) and related keys queues-workers-clear # purge worker queues (ns=\${PODX_QUEUE_NS}) @@ -844,6 +849,33 @@ PY if _redis_cli DEL "$_transcribe_key" >/dev/null; then echo "Transcription: resumed"; else echo "Failed to clear pause switch." >&2; exit 1; fi ;; + # ---------- Scanner / RQ helpers ---------- + scan-once) + # Run a single scan pass inside the scanner service to enqueue new files + if command -v docker >/dev/null 2>&1 && command -v docker compose >/dev/null 2>&1; then + docker compose run --rm -e SCAN_INTERVAL=0 podx-scanner \ + python -c "import scanner; n=scanner.enqueue_new_files(); print(f'Enqueued {n} new file(s)')" + else + echo "docker compose not found; run the scanner container manually." >&2; exit 1 + fi + ;; + rq-info) + : "${REDIS_URL:=redis://redis:6379/0}" + if command -v docker >/dev/null 2>&1 && command -v docker compose >/dev/null 2>&1; then + docker compose exec -T podx-worker-transcribe rq info -u "$REDIS_URL" + else + echo "docker compose not found; cannot run rq inside container." >&2; exit 1 + fi + ;; + rq-transcribe-requeue) + : "${REDIS_URL:=redis://redis:6379/0}" + if command -v docker >/dev/null 2>&1 && command -v docker compose >/dev/null 2>&1; then + docker compose exec -T podx-worker-transcribe rq requeue --all -u "$REDIS_URL" transcribe + else + echo "docker compose not found; cannot run rq inside container." >&2; exit 1 + fi + ;; + *) echo "Unknown command: $cmd" >&2 _help