Skip to content

Commit 7793949

Browse files
authored
fix: Liveness probe performs database queries (#19)
1 parent c27108a commit 7793949

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "flagsmith-common"
3-
version = "1.5.1"
3+
version = "1.5.2"
44
description = "Flagsmith's common library"
55
requires-python = ">=3.11,<4.0"
66
dependencies = [

src/common/core/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
urlpatterns = [
77
re_path(r"^version/?", views.version_info),
8-
re_path(r"^health/liveness/?", views.version_info),
8+
re_path(r"^health/liveness/?", views.liveness),
99
re_path(r"^health/readiness/?", include("health_check.urls", namespace="health")),
1010
re_path(r"^health", include("health_check.urls", namespace="health-deprecated")),
1111
# Aptible health checks must be on /healthcheck and cannot redirect

src/common/core/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
logger = logging.getLogger(__name__)
1111

1212

13+
def liveness(request: Request) -> JsonResponse:
14+
return JsonResponse({"status": "ok"})
15+
16+
1317
def version_info(request: Request) -> JsonResponse:
1418
return JsonResponse(utils.get_version_info())
1519

0 commit comments

Comments
 (0)