mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Revert "PyroFork: storage: mongo_storage: Move into async_pymongo"
This reverts commit 0280fc2572.
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
e45001ca8c
commit
c76e9263dd
2 changed files with 3 additions and 3 deletions
|
|
@ -3,7 +3,7 @@ import inspect
|
|||
import time
|
||||
from typing import List, Tuple, Any
|
||||
|
||||
from async_pymongo import AsyncClient
|
||||
from motor.motor_asyncio import AsyncIOMotorClient
|
||||
from pymongo import UpdateOne
|
||||
from pyrogram.storage.storage import Storage
|
||||
from pyrogram.storage.sqlite_storage import get_input_peer
|
||||
|
|
@ -34,7 +34,7 @@ class MongoStorage(Storage):
|
|||
|
||||
def __init__(self, name: str, uri: str, remove_peers: bool = False):
|
||||
super().__init__(name=name)
|
||||
database = AsyncClient(uri)[name]
|
||||
database = AsyncIOMotorClient(uri)[name]
|
||||
self.lock = asyncio.Lock()
|
||||
self.database = database
|
||||
self._peer = database['peers']
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
aiosqlite>=0.17.0,<0.19.0
|
||||
async_pymongo==0.1.2
|
||||
motor==3.1.2
|
||||
pyaes==1.6.1
|
||||
pymediainfo==6.0.1
|
||||
pymongo==4.3.3
|
||||
|
|
|
|||
Loading…
Reference in a new issue