Skip to content

Commit

Permalink
PyroFork: storage: mongo_storage: Move into async_pymongo
Browse files Browse the repository at this point in the history
Signed-off-by: wulan17 <wulan17@nusantararom.org>
  • Loading branch information
wulan17 committed May 19, 2023
1 parent 2bf362c commit 155a4a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyrogram/storage/mongo_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import time
from typing import List, Tuple, Any

from motor.motor_asyncio import AsyncIOMotorClient
from async_pymongo import AsyncClient
from pymongo import UpdateOne
from pyrogram.storage.storage import Storage
from pyrogram.storage.sqlite_storage import get_input_peer
Expand Down Expand Up @@ -34,7 +34,7 @@ class MongoStorage(Storage):

def __init__(self, name: str, uri: str, remove_peers: bool = False):
super().__init__(name=name)
database = AsyncIOMotorClient(uri)[name]
database = AsyncClient(uri)[name]
self.lock = asyncio.Lock()
self.database = database
self._peer = database['peers']
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aiosqlite>=0.17.0,<0.19.0
motor==3.1.2
async_pymongo==0.1.1
pyaes==1.6.1
pymediainfo==6.0.1
pymongo==4.3.3
Expand Down

0 comments on commit 155a4a8

Please sign in to comment.