Skip to content

Commit db0f841

Browse files
committed
fix: site health check
1 parent cfeec38 commit db0f841

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/views/health_check.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ def get_django_worker_health_check(self, request: Request) -> HealthCheck:
3333
)
3434

3535
if settings.DB_ENGINE == "postgresql":
36-
host = request.get_host()
37-
# if not host.endswith(":8080"):
38-
site_exists = Site.objects.filter(domain=host).exists()
36+
domain = settings.SERVICE_DOMAIN
37+
if settings.ENV == "local":
38+
domain += f":{settings.SERVICE_PORT}"
39+
40+
site_exists = Site.objects.filter(domain=domain).exists()
3941
health_check_details.append(
4042
name="site_exists",
4143
description=str(site_exists),

0 commit comments

Comments
 (0)