[Python] Feat: configurable log queue size (#2158)

* feat: configurable queue size

* chore: changelog, version

* fix: timeout
This commit is contained in:
matt
2025-08-18 13:11:19 -05:00
committed by GitHub
parent 355a7f197e
commit 19550614f7
5 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ jobs:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
timeout-minutes: 15
timeout-minutes: 20
steps:
- uses: actions/checkout@v5
+6
View File
@@ -5,6 +5,12 @@ All notable changes to Hatchet's Python SDK will be documented in this changelog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.17.1] - 2025-08-18
### Added
- Adds a `HATCHET_CLIENT_LOG_QUEUE_SIZE` environment variable to configure the size of the log queue used for capturing logs and forwarding them to Hatchet
## [1.17.0] - 2025-08-12
### Added
+1
View File
@@ -84,6 +84,7 @@ class ClientConfig(BaseSettings):
terminate_worker_after_num_tasks: int | None = None
disable_log_capture: bool = False
log_queue_size: int = 1000
grpc_enable_fork_support: bool = False
@model_validator(mode="after")
@@ -78,7 +78,9 @@ class LogRecord(BaseModel):
class AsyncLogSender:
def __init__(self, event_client: EventClient):
self.event_client = event_client
self.q = asyncio.Queue[LogRecord | STOP_LOOP_TYPE](maxsize=1000)
self.q = asyncio.Queue[LogRecord | STOP_LOOP_TYPE](
maxsize=event_client.client_config.log_queue_size
)
async def consume(self) -> None:
while True:
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hatchet-sdk"
version = "1.17.0"
version = "1.17.1"
description = ""
authors = ["Alexander Belanger <alexander@hatchet.run>"]
readme = "README.md"