#!/usr/bin/env sh # Job dispatcher for the preprocessing worker. # Usage: e.g. docker run 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