Commit d5ae215f authored by vadym.tishchenko's avatar vadym.tishchenko
Browse files

Add kwargs to the AppRunner

parent 4d7db971
......@@ -21,16 +21,17 @@ async def metrics(request):
class AioAppWrapper:
def __init__(self, _app, _port, _loop):
def __init__(self, _app, _port, _loop, **kwargs): = _app
self.port = _port
self.loop = _loop
self.runner = None
self.kwargs = kwargs
def initialize(self):'Initialize web app on port {self.port}')
self.runner = web.AppRunner(
self.runner = web.AppRunner(, **self.kwargs)
site = web.TCPSite(self.runner, '', self.port)
return site.start()
......@@ -72,10 +73,10 @@ class ApplicationWrapper:
self.add_web_app(init_mertics_app(), _port=9091)
def add_web_app(self, _app, _port):
def add_web_app(self, _app, _port, **kwargs):
AioAppWrapper(_app, _port, self.loop)
AioAppWrapper(_app, _port, self.loop, **kwargs)
def add_coroutine(self, _coro, _stop_callback=None):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment