diff --git a/pyproject.toml b/pyproject.toml index a1ef0ea2ae09..fd08c6457a7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,7 +116,7 @@ dependencies = [ "statsd>=3.3.0", "structlog>=22.1.0", "symbolic>=14.0.0a4", - "taskbroker-client>=0.20.36", + "taskbroker-client>=0.20.37", "tiktoken>=0.8.0", "tokenizers>=0.22.0", "tldextract>=5.1.2", diff --git a/src/sentry/runner/commands/run.py b/src/sentry/runner/commands/run.py index 0fd55e07a9c2..11a2f35a8a29 100644 --- a/src/sentry/runner/commands/run.py +++ b/src/sentry/runner/commands/run.py @@ -160,6 +160,12 @@ def taskworker_scheduler(redis_cluster: str, **options: Any) -> None: default=50052, type=int, ) +@click.option( + "--health-port", + help="Port for gRPC health checks in push mode, served apart from the push server. When set, pushes beyond --concurrency are rejected instead of queueing.", + default=None, + type=int, +) @click.option( "--num-brokers", help="Number of brokers available to connect to", default=None, type=int ) @@ -317,6 +323,7 @@ def run_taskworker( push_mode: bool, batch_push_mode: bool, worker_rpc_port: int, + health_port: int | None, rpc_host: str, num_brokers: int | None, rpc_host_list: str | None, @@ -360,6 +367,7 @@ def run_taskworker( health_check_file_path=health_check_file_path, health_check_sec_per_touch=health_check_sec_per_touch, grpc_port=worker_rpc_port, + health_port=health_port, push_task_timeout=push_timeout_sec, skip_awaiting_futures=skip_awaiting_futures, future_checking_frequency=future_checking_frequency, diff --git a/uv.lock b/uv.lock index 05c849e09fa1..29b7a5b1bb5e 100644 --- a/uv.lock +++ b/uv.lock @@ -2444,7 +2444,7 @@ requires-dist = [ { name = "stripe", specifier = ">=6.7.0" }, { name = "structlog", specifier = ">=22.1.0" }, { name = "symbolic", specifier = ">=14.0.0a4" }, - { name = "taskbroker-client", specifier = ">=0.20.36" }, + { name = "taskbroker-client", specifier = ">=0.20.37" }, { name = "tiktoken", specifier = ">=0.8.0" }, { name = "tldextract", specifier = ">=5.1.2" }, { name = "tokenizers", specifier = ">=0.22.0" }, @@ -2837,7 +2837,7 @@ wheels = [ [[package]] name = "taskbroker-client" -version = "0.20.36" +version = "0.20.37" source = { registry = "https://pypi.devinfra.sentry.io/simple" } dependencies = [ { name = "confluent-kafka" }, @@ -2854,7 +2854,7 @@ dependencies = [ { name = "zstandard" }, ] wheels = [ - { url = "https://pypi.devinfra.sentry.io/wheels/taskbroker_client-0.20.36-py3-none-any.whl", hash = "sha256:a02c66eb18447e0fce6653f8de1efbf20efd01f242c545231e4a5fdf51ec6219" }, + { url = "https://pypi.devinfra.sentry.io/wheels/taskbroker_client-0.20.37-py3-none-any.whl", hash = "sha256:e98dde322fd6de02ae7ae52ef9cf2e468d03ebf8ee17f4b48242eaabb1cd1425" }, ] [[package]]