From dd901cd2cfc2b72b18ea0fcac0cc478b33198d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20N=C3=A4slund?= Date: Sun, 13 Nov 2022 22:28:12 +0100 Subject: better mongodb handling --- src/collector/main.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/collector/main.py') diff --git a/src/collector/main.py b/src/collector/main.py index 36a8ebd..beaf2ea 100755 --- a/src/collector/main.py +++ b/src/collector/main.py @@ -10,8 +10,6 @@ from bson import ( ObjectId, json_util, ) -from dotenv import load_dotenv - from .db import ( DBClient, SearchInput, @@ -19,7 +17,6 @@ from .db import ( from .schema import valid_schema -load_dotenv() # Get credentials if "MONGODB_USERNAME" not in environ or "MONGODB_PASSWORD" not in environ or "MONGODB_COLLECTION" not in environ: print("Missing MONGODB_USERNAME or MONGODB_PASSWORD or MONGODB_COLLECTION in env") @@ -167,4 +164,4 @@ async def info() -> JSONResponse: """ count = await db.estimated_document_count() - return JSONResponse(content={"status": "success", "Estimated document count": count}) + return JSONResponse(content={"status": "success", "estimated document count": count}) -- cgit v1.1