Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
libretto committed Sep 5, 2023
1 parent 34fa7dc commit 46605f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions karapace.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"statsd_host": "127.0.0.1",
"statsd_port": 8125,
"prometheus_host": "127.0.0.1",
"prometheus_port": 8005

"prometheus_port": 8005,

}
5 changes: 2 additions & 3 deletions karapace/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ class Config(TypedDict):
prometheus_host: str | None
prometheus_port: int | None


sentry: NotRequired[Mapping[str, object]]
tags: NotRequired[Mapping[str, object]]
sentry: NotRequired[Mapping[str, object]]
tags: NotRequired[Mapping[str, object]]


class ConfigDefaults(Config, total=False):
Expand Down
2 changes: 1 addition & 1 deletion karapace/statsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
port: int = STATSD_PORT,
) -> None:
super().__init__(config)
self._tags: Final[dict] = config.get("tags", {})
self._tags: Final = config.get("tags", {})
_host = config.get("statsd_host") if "statsd_host" in config else host
_port = config.get("statsd_port") if "statsd_port" in config else port
self._dest_addr: Final = (_host, _port)
Expand Down

0 comments on commit 46605f4

Please sign in to comment.