Skip to content

Commit 18c3482

Browse files
authored
Put healthcheck back (#412)
1 parent bb13b7c commit 18c3482

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/launchpad/server.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
)
2525

2626
from .utils.logging import get_logger
27-
from .utils.statsd import OK, NullStatsd, StatsdInterface
27+
from .utils.statsd import CRITICAL, OK, NullStatsd, StatsdInterface
2828

2929
logger = get_logger(__name__)
3030

@@ -122,15 +122,15 @@ def is_healthy(self):
122122
return True
123123

124124
def health_check(self, request: Request) -> Response:
125-
# is_healthy = self.health_check_callback()
126-
# if is_healthy:
127-
json_status = "ok"
128-
statsd_status = OK
129-
http_status = 200
130-
# else:
131-
# json_status = "error"
132-
# statsd_status = CRITICAL
133-
# http_status = 500
125+
is_healthy = self.health_check_callback()
126+
if is_healthy:
127+
json_status = "ok"
128+
statsd_status = OK
129+
http_status = 200
130+
else:
131+
json_status = "error"
132+
statsd_status = CRITICAL
133+
http_status = 500
134134

135135
sentry_region = self.config.sentry_region
136136

0 commit comments

Comments
 (0)