revert changes
This commit is contained in:
parent
34df884be7
commit
25796595f3
1 changed files with 3 additions and 5 deletions
|
@ -52,10 +52,8 @@ def create_matrix_client(config: Config) -> AsyncClient:
|
||||||
|
|
||||||
|
|
||||||
async def start_matrix_client(
|
async def start_matrix_client(
|
||||||
client: AsyncClient, webhook_server: Webhook, cache: Cache, config: Config
|
client: AsyncClient, cache: Cache, config: Config
|
||||||
) -> bool:
|
) -> bool:
|
||||||
await webhook_server.start()
|
|
||||||
|
|
||||||
# Keep trying to reconnect on failure (with some time in-between)
|
# Keep trying to reconnect on failure (with some time in-between)
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
@ -136,8 +134,8 @@ def main() -> None:
|
||||||
webhook_server = Webhook(client, cache, config)
|
webhook_server = Webhook(client, cache, config)
|
||||||
|
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
# loop.create_task(webhook_server.start())
|
loop.create_task(webhook_server.start())
|
||||||
loop.create_task(start_matrix_client(client, webhook_server, cache, config))
|
loop.create_task(start_matrix_client(client, cache, config))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
loop.run_forever()
|
loop.run_forever()
|
||||||
|
|
Loading…
Reference in a new issue