#!/bin/bash
echo "Running preprocessor" >&2
debug="--no-debug"
if test "$DEBUG" = true; then
    debug="--debug"
fi

preprocessor daemon \
    --config-file /config.yaml \
    --host ${REDIS_HOST} \
    --port ${REDIS_PORT} \
    --listen-queue ${REDIS_PREPROCESS_QUEUE_KEY} \
    --write-queue ${REDIS_REGISTER_QUEUE_KEY} \
    ${debug}  >&2