Skip to content

Commit

Permalink
(fix): fixed inconsistenicies in the code and removed debug statements
Browse files Browse the repository at this point in the history
Signed-off-by: Kannav02 <[email protected]>
  • Loading branch information
Kannav02 committed Nov 20, 2024
1 parent ad3513b commit 5c7de55
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions common/mongoClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@
feedback_collection_name = "feedback"
context_collection_name = "context"

print(os.getenv("MONGO_DB_URI"))


def get_mongo_client() -> Database:
def get_mongo_db_client() -> Database:
"""
Get the MongoDB client.
Returns:
- MongoClient: The MongoDB client.
- DatabaseClient: The Database client.
Note:
MongoDB doesn't create a collection or a database until it gets content, so no need to check if the data already exists or not.
Expand Down Expand Up @@ -149,5 +146,6 @@ def create_collection(collection_name:str,client_database:Database,validator:obj
except Exception as e:
print(f"Failed to create collection: {e}")
return None

submit_feedback()

if __name__ == "__main__":
submit_feedback()

0 comments on commit 5c7de55

Please sign in to comment.