Skip to content

Commit

Permalink
Update http.py
Browse files Browse the repository at this point in the history
Signed-off-by: Deviant <112615715+DEViantUA@users.noreply.github.com>
  • Loading branch information
DEViantUA authored Mar 20, 2024
1 parent 9c7467b commit 80a4862
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions starrailcard/src/tools/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
class AioSession:
_session = None
_semaphore = asyncio.Semaphore(5)

@classmethod
async def creat_session(cls):
"""Creates a session
Returns:
aiohttp.ClientSession: The session instance.
"""
cls._session = aiohttp.ClientSession()

return cls._session

@classmethod
async def get_session(cls):
Expand Down

0 comments on commit 80a4862

Please sign in to comment.