MM58-crypto commited on
Commit
87ab0b1
·
1 Parent(s): 33f882b

wooo another commit

Browse files
Files changed (1) hide show
  1. main.py +3 -7
main.py CHANGED
@@ -46,9 +46,9 @@ from dotenv import load_dotenv
46
  connection_uri = os.getenv("MONGODB_URL")
47
  client = MongoClient(connection_uri)
48
 
49
- try:
50
- db = client.get_database("Sebayhi_convos")
51
- collection = db.get_collection("collection_0")
52
 
53
 
54
  #query = {"title": "Back to the Future"}
@@ -56,10 +56,6 @@ try:
56
 
57
  #print(json.dumps(movie, indent=4, default=str))
58
 
59
- client.close()
60
-
61
- except Exception as e:
62
- raise Exception("Unable to execute due to the following error: ", e)
63
 
64
  def run_query(message: str, intent: str) -> str:
65
  """
 
46
  connection_uri = os.getenv("MONGODB_URL")
47
  client = MongoClient(connection_uri)
48
 
49
+
50
+ db = client.get_database("Sebayhi_convos")
51
+ collection = db.get_collection("collection_0")
52
 
53
 
54
  #query = {"title": "Back to the Future"}
 
56
 
57
  #print(json.dumps(movie, indent=4, default=str))
58
 
 
 
 
 
59
 
60
  def run_query(message: str, intent: str) -> str:
61
  """