From 58b478c93738198845a645aceae31fef171904ba Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 14 Feb 2019 18:49:06 +0000 Subject: [PATCH] Add healthcheck endpoint --- actioner/main.py | 1 - actioner/web/__init__.py | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/actioner/main.py b/actioner/main.py index d2343b8..b15299c 100644 --- a/actioner/main.py +++ b/actioner/main.py @@ -9,7 +9,6 @@ def main(): server = get_server() web_process = Process(target=run_web_app, args=(server,)) web_process.start() - web_process.join() if __name__ == '__main__': diff --git a/actioner/web/__init__.py b/actioner/web/__init__.py index e2b4215..d23f5f2 100644 --- a/actioner/web/__init__.py +++ b/actioner/web/__init__.py @@ -1,6 +1,11 @@ from aiohttp import web +async def healthcheck(request): + return web.json_response({}) + + def get_server(): app = web.Application() + app.router.add_get("/healthcheck", healthcheck) return app