From 6350ff688cd62dc4e5ce7799d06459f609483f19 Mon Sep 17 00:00:00 2001 From: slice Date: Sat, 16 Jun 2018 17:00:08 -0700 Subject: [PATCH] clean --- run.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/run.py b/run.py index 1260110..f570da2 100644 --- a/run.py +++ b/run.py @@ -19,20 +19,17 @@ app = make_app() @app.before_serving -async def create_db_pool(): - """Startup tasks for app""" +async def app_before_serving(): log.info('opening db') app.db_pool = await asyncpg.create_pool(**app.config['POSTGRES']) @app.after_serving -async def close_db_pool(): - """Close the DB connection.""" +async def app_after_serving(): log.info('closing db') await app.db_pool.close() @app.route('/') async def index(): - """Base handler for /.""" return 'hai'