feat(preprocessing): add first version of preprocessing, dockerize news job processing
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user