mirror of
https://github.com/rommapp/romm.git
synced 2026-03-03 02:27:00 +00:00
Merge pull request #2968 from Wadenschwinger/fix/watcher-otel-disabled-env-passthrough
Fix: skip opentelemetry-instrument when OTEL is disabled
This commit is contained in:
@@ -219,10 +219,19 @@ start_bin_rq_worker() {
|
||||
|
||||
start_bin_watcher() {
|
||||
info_log "Starting watcher"
|
||||
watchfiles \
|
||||
--target-type command \
|
||||
"opentelemetry-instrument --service_name '${OTEL_SERVICE_NAME_PREFIX-}watcher' python3 watcher.py" \
|
||||
/romm/library &
|
||||
if [[ ${OTEL_SDK_DISABLED:-false} == "true" ]]; then
|
||||
# Skip opentelemetry-instrument when OTEL is disabled to ensure
|
||||
# WATCHFILES_CHANGES env var is properly passed to watcher.py
|
||||
watchfiles \
|
||||
--target-type command \
|
||||
"python3 watcher.py" \
|
||||
/romm/library &
|
||||
else
|
||||
watchfiles \
|
||||
--target-type command \
|
||||
"opentelemetry-instrument --service_name '${OTEL_SERVICE_NAME_PREFIX-}watcher' python3 watcher.py" \
|
||||
/romm/library &
|
||||
fi
|
||||
WATCHER_PID=$!
|
||||
echo "${WATCHER_PID}" >/tmp/watcher.pid
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user