From a4e0f4ab5470453e19f40593101d8e418a87d7da Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 14 Feb 2019 20:03:55 +0000 Subject: [PATCH] Move healthcheck endpoint to new file --- actioner/web/__init__.py | 8 +------- actioner/web/healthcheck.py | 8 ++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 actioner/web/healthcheck.py diff --git a/actioner/web/__init__.py b/actioner/web/__init__.py index 3c96f08..b8c8e2a 100644 --- a/actioner/web/__init__.py +++ b/actioner/web/__init__.py @@ -1,11 +1,5 @@ from aiohttp import web -from actioner.clients import github - -async def healthcheck(request): - return web.json_response({ - 'github': github.get_user().login - }) - +from .healthcheck import healthcheck def get_server(): app = web.Application() diff --git a/actioner/web/healthcheck.py b/actioner/web/healthcheck.py new file mode 100644 index 0000000..6bb4af8 --- /dev/null +++ b/actioner/web/healthcheck.py @@ -0,0 +1,8 @@ +from aiohttp import web +from actioner.clients import github + + +async def healthcheck(request): + return web.json_response({ + 'github': github.get_user().login + })