From 21d2dad87ad15bb59df5ed4777f73b1b379de7ab Mon Sep 17 00:00:00 2001 From: Kim Gustyr Date: Wed, 24 Jun 2026 13:42:42 +0100 Subject: [PATCH] fix(clickhouse): Task processor startup queries ClickHouse migrations on every boot The task processor entrypoint gated startup on a waitfordb migration check against the ClickHouse connection, forcing a query that wakes an idle CH Cloud DWH and intermittently failed with Code: 517 (replica metadata lag). The check is redundant since migrations are already applied earlier in the entrypoint. beep boop --- api/Makefile | 1 - api/scripts/run-docker.sh | 3 --- 2 files changed, 4 deletions(-) diff --git a/api/Makefile b/api/Makefile index 3eabf612a0cf..47a7f6283406 100644 --- a/api/Makefile +++ b/api/Makefile @@ -63,7 +63,6 @@ docker-build: wait-for-db: uv run python manage.py waitfordb uv run python manage.py waitfordb --database analytics - uv run python manage.py waitfordb --database clickhouse .PHONY: test test: docker-up wait-for-db diff --git a/api/scripts/run-docker.sh b/api/scripts/run-docker.sh index 35cc39d63496..9d8c061ef325 100755 --- a/api/scripts/run-docker.sh +++ b/api/scripts/run-docker.sh @@ -45,9 +45,6 @@ run_task_processor() { if [ -n "$TASK_PROCESSOR_DATABASE_URL" ] || [ -n "$TASK_PROCESSOR_DATABASE_NAME" ]; then waitfordb --waitfor 30 --migrations --database task_processor fi - if [ -n "$CLICKHOUSE_URL" ] || [ -n "$CLICKHOUSE_HOST" ]; then - waitfordb --waitfor 30 --migrations --database clickhouse - fi exec flagsmith start \ --bind 0.0.0.0:8000 \ --access-logfile $ACCESS_LOG_LOCATION \