Revert "Update to Python3.11"

This reverts commit d6ba45a42be3717370748fa56484ebef69f4bf52.
This commit is contained in:
Raffson 2023-10-15 20:53:03 +02:00
parent b0047784dc
commit be634ab961
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ runs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
python-version: "3.10"
cache: pip
- name: Install environment

View File

@ -1,4 +1,4 @@
from asyncio import wait, create_task
from asyncio import wait
from fastapi import APIRouter, WebSocket
from fastapi.encoders import jsonable_encoder
@ -17,7 +17,7 @@ class ConnectionManager:
async def shutdown(self) -> None:
futures = []
for connection in self.active_connections:
futures.append(create_task(connection.close()))
futures.append(connection.close())
await wait(futures)
async def connect(self, websocket: WebSocket) -> None:
@ -30,7 +30,7 @@ class ConnectionManager:
async def broadcast(self, events: GameUpdateEventsJs) -> None:
futures = []
for connection in self.active_connections:
futures.append(create_task(connection.send_json(jsonable_encoder(events))))
futures.append(connection.send_json(jsonable_encoder(events)))
await wait(futures)