Skip to content

Commit

Permalink
Bump version to 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
michael.yak authored and michaelyaakoby committed Sep 17, 2022
1 parent 8bf68c8 commit c5e5941
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/Advanced/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python = "^3.9"
psutil = { version = "^5.6" }
fastapi = { version = "^0.65.2" }
uvicorn = { version = "^0.11.7" }
pyctuator = { version = "^1.0.0" }
pyctuator = { version = "^1.0.1" }
sqlalchemy = { version = "^1.3" }
PyMySQL = { version = "^0.9.3" }
cryptography = { version = "^2.8" }
Expand Down
2 changes: 1 addition & 1 deletion examples/FastAPI/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python = "^3.9"
psutil = { version = "^5.6" }
fastapi = { version = "^0.82.0" }
uvicorn = { version = "^0.18.2" }
pyctuator = { version = "^1.0.0" }
pyctuator = { version = "^1.0.1" }

[build-system]
requires = ["poetry>=0.12"]
Expand Down
2 changes: 1 addition & 1 deletion examples/Flask/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = [
python = "^3.9"
psutil = { version = "^5.6" }
flask = { version = "^2.2.2" }
pyctuator = { version = "^1.0.0" }
pyctuator = { version = "^1.0.1" }

[build-system]
requires = ["poetry>=0.12"]
Expand Down
2 changes: 1 addition & 1 deletion examples/aiohttp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = [
python = "^3.9"
psutil = { version = "^5.6" }
aiohttp = { version = "^3.6.2" }
pyctuator = { version = "^1.0.0" }
pyctuator = { version = "^1.0.1" }

[build-system]
requires = ["poetry>=0.12"]
Expand Down
2 changes: 1 addition & 1 deletion examples/tornado/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = [
python = "^3.9"
psutil = { version = "^5.6" }
tornado = { version = "^6.0.4" }
pyctuator = { version = "^1.0.0" }
pyctuator = { version = "^1.0.1" }

[build-system]
requires = ["poetry>=0.12"]
Expand Down
6 changes: 6 additions & 0 deletions pyctuator/health/health_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ class HealthSummary:
details: Mapping[str, HealthStatus]

def http_status(self) -> int:
"""
:return: The HTTP according to the service's health. Done according to the documentation in
https://docs.spring.io/spring-boot/docs/2.7.0/reference/htmlsingle/#actuator.endpoints.health.writing-custom-health-indicators
The HTTP status code in the response reflects the overall health status. By default, OUT_OF_SERVICE
and DOWN map to 503. Any unmapped health statuses, including UP, map to 200.
"""
if self.status == Status.DOWN:
return HTTPStatus.SERVICE_UNAVAILABLE
return HTTPStatus.OK
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyctuator"
version = "1.0.0"
version = "1.0.1"
description = "A Python implementation of the Spring Actuator API for popular web frameworks"
authors = [
"Michael Yakobi <michael.yakobi@solaredge.com>",
Expand Down

0 comments on commit c5e5941

Please sign in to comment.