Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ install:
uv sync --all-extras --frozen --group lint

lint:
uv run end-of-file-fixer .
uv run eof-fixer .
uv run ruff format
uv run ruff check --fix
uv run mypy .

lint-ci:
uv run end-of-file-fixer . --check
uv run eof-fixer . --check
uv run ruff format --check
uv run ruff check --no-fix
uv run mypy .
Expand Down
14 changes: 9 additions & 5 deletions lite_bootstrap/instruments/healthchecks_instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ class HealthChecksConfig(BaseConfig):
health_checks_path: str = "/health/"
health_checks_include_in_schema: bool = False

@property
def health_check_data(self) -> HealthCheckTypedDict:
return {
"service_version": self.service_version,
"service_name": self.service_name,
"health_status": True,
}


@dataclasses.dataclass(kw_only=True, slots=True, frozen=True)
class HealthChecksInstrument(BaseInstrument):
Expand All @@ -27,8 +35,4 @@ def is_ready(self) -> bool:
return self.bootstrap_config.health_checks_enabled

def render_health_check_data(self) -> HealthCheckTypedDict:
return {
"service_version": self.bootstrap_config.service_version,
"service_name": self.bootstrap_config.service_name,
"health_status": True,
}
return self.bootstrap_config.health_check_data
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ dev = [
lint = [
"mypy",
"ruff",
"end-of-file-fixer",
"eof-fixer",
]

[build-system]
Expand Down
Loading