Files
smartguide/preprocessing/entrypoint.sh
T

26 lines
608 B
Bash

#!/usr/bin/env sh
# Job dispatcher for the preprocessing worker.
# Usage: <job-name> e.g. docker run <image> news
set -eu
JOB="${1:-}"
case "$JOB" in
news)
# Enrich new 'aktuell' articles into 'aktuell_postproc' (relevance, authors, keywords).
exec python sync.py --sync-delta
;;
news-stats)
# Print counts for the aktuell / aktuell_postproc indices (read-only).
exec python sync.py --stats
;;
"")
echo "No job given. Available jobs: news, news-stats" >&2
exit 2
;;
*)
echo "Unknown job: $JOB. Available jobs: news, news-stats" >&2
exit 2
;;
esac