Skip to content

Commit 74f2276

Browse files
simpler health check port env var
1 parent 8c6dfe9 commit 74f2276

File tree

1 file changed

+1
-6
lines changed
  • src/agentex/lib/core/temporal/workers

1 file changed

+1
-6
lines changed

src/agentex/lib/core/temporal/workers/worker.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,14 @@ def __init__(
8989
task_queue,
9090
max_workers: int = 10,
9191
max_concurrent_activities: int = 10,
92-
health_check_port: int | None = None,
92+
health_check_port: int = int(os.environ.get("HEALTH_CHECK_PORT", "80")),
9393
):
9494
self.task_queue = task_queue
9595
self.activity_handles = []
9696
self.max_workers = max_workers
9797
self.max_concurrent_activities = max_concurrent_activities
9898
self.health_check_server_running = False
9999
self.healthy = False
100-
101-
# Use environment variable if health_check_port not explicitly provided
102-
if health_check_port is None:
103-
health_check_port = int(os.environ.get("HEALTH_CHECK_PORT", "80"))
104-
105100
self.health_check_port = health_check_port
106101

107102
@overload

0 commit comments

Comments
 (0)