def create_application(config, loop=None):
    app = web.Application(loop=loop)
    app['config'] = config
    log.initilize(config['log'])
    app.on_startup.append(on_startup)
    app.on_cleanup.append(on_cleanup)
    register_routers(app)
    return app
def create_application(config, loop=None):
    app = web.Application(loop=loop)
    app['config'] = config
    log.initilize(config['log'])
    app.on_startup.append(on_startup)
    app.on_cleanup.append(on_cleanup)
    register_routers(app)
    return app