mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-11-27 17:37:47 +01:00
Check service naming only if using Redis
This commit is contained in:
1 parent
aae6b9bd4d
commit
54bf7bf895
1 file changed
+11
-10
+11
-10
@@ -1,20 +1,21 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [[ -z "${PIPELINE_NAME}" ]]; then
|
||||
echo "Environment variable PIPELINE_NAME not defined."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [[ -z "${SERVICE_NAME}" ]]; then
|
||||
echo "Environment variable SERVICE_NAME not defined."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
REDIS_SKIP="${REDIS_SKIP:-false}"
|
||||
|
||||
# Download config from Redis to redis_config.json and start status reporting.
|
||||
if [ "${REDIS_SKIP}" = false ]; then
|
||||
|
||||
if [[ -z "${PIPELINE_NAME}" ]]; then
|
||||
echo "Environment variable PIPELINE_NAME not defined."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [[ -z "${SERVICE_NAME}" ]]; then
|
||||
echo "Environment variable SERVICE_NAME not defined."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
REDIS_HOST="${REDIS_HOST:-127.0.0.1}"
|
||||
REDIS_CONFIG_KEY=config."${PIPELINE_NAME}"
|
||||
REDIS_STATUS_KEY=status."${PIPELINE_NAME}.${SERVICE_NAME}"
|
||||
|
||||
Reference in new issue
Block a user