Spaces:
Paused
Paused
Commit ·
6677ff2
1
Parent(s): 979e812
upd db name
Browse files
app/db.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
|
| 2 |
# app/db.py
|
| 3 |
import motor.motor_asyncio
|
| 4 |
from gridfs import GridFSBucket
|
|
@@ -6,5 +5,6 @@ import os
|
|
| 6 |
|
| 7 |
MONGO_URI = os.getenv("MONGODB_URI")
|
| 8 |
client = motor.motor_asyncio.AsyncIOMotorClient(MONGO_URI)
|
| 9 |
-
|
|
|
|
| 10 |
grid_fs_bucket = GridFSBucket(db)
|
|
|
|
|
|
|
| 1 |
# app/db.py
|
| 2 |
import motor.motor_asyncio
|
| 3 |
from gridfs import GridFSBucket
|
|
|
|
| 5 |
|
| 6 |
MONGO_URI = os.getenv("MONGODB_URI")
|
| 7 |
client = motor.motor_asyncio.AsyncIOMotorClient(MONGO_URI)
|
| 8 |
+
MONGO_DB_NAME = os.getenv("MONGODB_DB", "querysearcher") # fallback default
|
| 9 |
+
db = client[MONGO_DB_NAME]
|
| 10 |
grid_fs_bucket = GridFSBucket(db)
|