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:
wulan17 2023-05-23 20:48:58 +07:00
parent e45001ca8c
commit c76e9263dd
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5
2 changed files with 3 additions and 3 deletions

View file

@ -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']

View file

@ -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