MCPcopy Create free account
hub / github.com/geekcomputers/Python / dbFetcher

Method dbFetcher

insta_monitering/insta_datafetcher.py:373–384  ·  view source on GitHub ↗
(self, limit=20)

Source from the content-addressed store, hash-verified

371 print("error::DBDataFetcher.init>>", sys.exc_info()[1])
372
373 def dbFetcher(self, limit=20):
374 mainlist = []
375 try:
376 records = self._collection.find().sort("id", -1).limit(limit)
377 for i in records:
378 del i["_id"]
379 mainlist.append(i)
380 except Exception as err:
381 print(f"exception : {err}\n")
382 print("error::dbFetcher>>", sys.exc_info()[1])
383 finally:
384 return ujson.dumps(mainlist)
385
386 def DBFetcherGreater(self, limit, date):
387 mainlist = []

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected