feat(preprocessing): add first version of preprocessing, dockerize news job processing

This commit is contained in:
2026-07-14 19:02:40 +02:00
parent 5d1d62acb8
commit 532c94b00b
9 changed files with 491 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/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