use run_until_complete

This commit is contained in:
Luna Mendes 2018-02-24 22:10:52 -03:00
parent 148ec0fcb7
commit dc589d9f3e

View file

@ -213,8 +213,9 @@ def main():
coro = asyncio.start_unix_server(handle_client, sys.argv[1],
loop=loop)
pool = loop.create_task(asyncpg.create_pool(**config.db))
pool = loop.run_until_complete(asyncpg.create_pool(**config.db))
db = pool
server = loop.run_until_complete(coro)
if config.bot_token: