Skip to content

Commit

Permalink
chore(worker): make python healthcheck port configurable (#83)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Pilar <[email protected]>
  • Loading branch information
pilartomas authored Nov 20, 2024
1 parent 1255cab commit c274ec2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions workers/python/python/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class Config(BaseSettings):
model_config = SettingsConfigDict(
env_file='../../.env', env_file_encoding='utf-8', env_ignore_empty=True, extra='ignore')

port: int = 8080

log_level: str = 'info'

run_bullmq_workers_raw: str = Field(alias='run_bullmq_workers')
Expand Down
2 changes: 1 addition & 1 deletion workers/python/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async def healthcheck(request):
app.add_routes([web.get('/health', healthcheck)])
runner = web.AppRunner(app)
await runner.setup()
site = web.TCPSite(runner, '0.0.0.0', 8080)
site = web.TCPSite(runner, '0.0.0.0', config.port)
await site.start()
logger.info("HTTP server started")

Expand Down

0 comments on commit c274ec2

Please sign in to comment.