Skip to content

Commit

Permalink
fix: UC_INTEGRATION_HTTP_PORT env var handling
Browse files Browse the repository at this point in the history
  • Loading branch information
zehnm committed Nov 8, 2023
1 parent 916b8d8 commit fa5a902
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

_Changes in the next release_

### Fixed
- Environment variable `UC_INTEGRATION_HTTP_PORT` to override server port.

---

## v0.1.2 - 2023-11-07
Expand Down
9 changes: 4 additions & 5 deletions ucapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,10 @@ async def init(

# publishing interface, defaults to "0.0.0.0" if not set
interface = os.getenv("UC_INTEGRATION_INTERFACE")
port = int(
os.getenv("UC_INTEGRATION_HTTP_PORT") or self._driver_info["port"]
if "port" in self._driver_info
else 9090
)
if os.getenv("UC_INTEGRATION_HTTP_PORT"):
port = int(os.getenv("UC_INTEGRATION_HTTP_PORT"))
else:
port = self._driver_info["port"] if "port" in self._driver_info else 9090

_adjust_driver_url(self._driver_info, port)

Expand Down

0 comments on commit fa5a902

Please sign in to comment.