Skip to content

Commit 079a76f

Browse files
committed
fix(botbase): dont open and close db now
1 parent 3d2f78f commit 079a76f

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

botbase/botbase.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,6 @@ def asyncio_handler(self, _, context: dict) -> None:
260260
log.error("\n".join(log_lines), exc_info=exc_info)
261261

262262
async def start(self, token: str, *, reconnect: bool = True) -> None:
263-
if self.db_enabled:
264-
from .db import database
265-
266-
await database.connect()
267-
268263
if self.aiohttp_enabled:
269264
self.session = ClientSession()
270265

@@ -290,12 +285,6 @@ async def close(self, *args, **kwargs) -> None:
290285
if self.aiohttp_enabled and hasattr(self, "session"):
291286
await self.session.close()
292287

293-
if self.db_enabled:
294-
with suppress(AsyncTimeoutError):
295-
from .db import database
296-
297-
await wait_for(database.disconnect(), timeout=5)
298-
299288
await super().close(*args, **kwargs)
300289

301290
async def on_application_command_error(*_):

0 commit comments

Comments
 (0)