(connection, request)
| 18 | |
| 19 | |
| 20 | def health_check(connection, request): |
| 21 | if request.path == "/healthz": |
| 22 | return connection.respond(http.HTTPStatus.OK, "OK\n") |
| 23 | if request.path == "/inemuri": |
| 24 | loop = asyncio.get_running_loop() |
| 25 | loop.call_later(1, time.sleep, 10) |
| 26 | return connection.respond(http.HTTPStatus.OK, "Sleeping for 10s\n") |
| 27 | if request.path == "/seppuku": |
| 28 | loop = asyncio.get_running_loop() |
| 29 | loop.call_later(1, sys.exit, 69) |
| 30 | return connection.respond(http.HTTPStatus.OK, "Terminating\n") |
| 31 | |
| 32 | |
| 33 | async def main(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…