dev@locazia: add client_bot & try fix background funcs
This commit is contained in:
1 parent
27b093bc07
commit
f4b77f38e4
10 files changed
+228
-17
No files matched your search
@@ -2,7 +2,9 @@ import asyncio
|
||||
from contextlib import asynccontextmanager
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from aiogram import Bot
|
||||
from app.core.logger import make_log
|
||||
from app.core._config import TELEGRAM_API_KEY, CLIENT_TELEGRAM_API_KEY
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
@@ -32,6 +34,9 @@ class Memory:
|
||||
}
|
||||
}
|
||||
|
||||
self._telegram_bot = Bot(TELEGRAM_API_KEY)
|
||||
self._client_telegram_bot = Bot(CLIENT_TELEGRAM_API_KEY)
|
||||
|
||||
@asynccontextmanager
|
||||
async def transaction(self, desc=""):
|
||||
make_log("Memory.transaction", f"Starting transaction; {desc}", level='debug')
|
||||
|
||||
Reference in new issue
Block a user