Spaces:
Running
Running
Commit
•
9b6cfad
1
Parent(s):
bf81ef0
Update db_operations/db_operations.py
Browse files
db_operations/db_operations.py
CHANGED
@@ -31,14 +31,13 @@ class DBOperations:
|
|
31 |
db = self.__client[self.database]
|
32 |
coll = db[self.collection]
|
33 |
docs = []
|
34 |
-
maxtries =
|
35 |
ntry = 0
|
36 |
if (len(docs) == 0) and (ntry < maxtries):
|
37 |
for doc in coll.find():
|
38 |
docs.append(doc)
|
39 |
logging.info(f"DB Read try: {ntry}")
|
40 |
-
|
41 |
-
time.sleep(5)
|
42 |
|
43 |
rss_df = pd.DataFrame(docs)
|
44 |
except Exception as insert_err:
|
|
|
31 |
db = self.__client[self.database]
|
32 |
coll = db[self.collection]
|
33 |
docs = []
|
34 |
+
maxtries = 5
|
35 |
ntry = 0
|
36 |
if (len(docs) == 0) and (ntry < maxtries):
|
37 |
for doc in coll.find():
|
38 |
docs.append(doc)
|
39 |
logging.info(f"DB Read try: {ntry}")
|
40 |
+
# time.sleep(1)
|
|
|
41 |
|
42 |
rss_df = pd.DataFrame(docs)
|
43 |
except Exception as insert_err:
|