:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(tasks): include tasks task queue in liveness interceptor (#57739)
Joshua Snyder63d85ef541c1
diff --git a/posthog/temporal/common/liveness_tracker.py b/posthog/temporal/common/liveness_tracker.pyindex f8cb6b0bec0b..d7b5497e3361 100644--- a/posthog/temporal/common/liveness_tracker.py+++ b/posthog/temporal/common/liveness_tracker.py@@ -121,7 +121,7 @@ class _LivenessWorkflowInterceptor(WorkflowInboundInterceptor):class LivenessInterceptor(Interceptor):"""Interceptor that tracks worker liveness for health checks."""- task_queue = (settings.DATA_WAREHOUSE_TASK_QUEUE, settings.MAX_AI_TASK_QUEUE)+ task_queue = (settings.DATA_WAREHOUSE_TASK_QUEUE, settings.MAX_AI_TASK_QUEUE, settings.TASKS_TASK_QUEUE)def intercept_activity(self, next: ActivityInboundInterceptor) -> ActivityInboundInterceptor:return _LivenessActivityInboundInterceptor(super().intercept_activity(next))diff --git a/posthog/temporal/tests/common/test_liveness_tracker.py b/posthog/temporal/tests/common/test_liveness_tracker.pyindex a9691e226bce..5acf6e5a47c2 100644--- a/posthog/temporal/tests/common/test_liveness_tracker.py+++ b/posthog/temporal/tests/common/test_liveness_tracker.py@@ -3,9 +3,13 @@ import timeimport pytestfrom unittest.mock import AsyncMock, MagicMock+from django.conf import settings+from temporalio.worker import ExecuteActivityInput, ExecuteWorkflowInput+from posthog.temporal.common.interceptor import is_task_queue_supportedfrom posthog.temporal.common.liveness_tracker import (+ LivenessInterceptor,LivenessTracker,_LivenessActivityInboundInterceptor,_LivenessWorkflowInterceptor,@@ -148,6 +152,19 @@ class TestLivenessTracker:assert tracker1 is tracker2+ "task_queue,supported",+ (+ (settings.DATA_WAREHOUSE_TASK_QUEUE, True),+ (settings.MAX_AI_TASK_QUEUE, True),+ (settings.TASKS_TASK_QUEUE, True),+ ("some-other-queue", False),+ ),+)+def test_liveness_interceptor_supports_expected_task_queues(task_queue, supported):+ assert is_task_queue_supported(task_queue, LivenessInterceptor) is supported++@pytest.mark.asyncioclass TestLivenessActivityInboundInterceptor:async def test_records_execution_on_success(self):