MCPcopy Index your code
hub / github.com/geekcomputers/Python / statusCheck

Method statusCheck

insta_monitering/insta_datafetcher.py:341–360  ·  view source on GitHub ↗
(self, user, tags, productId)

Source from the content-addressed store, hash-verified

339 return True
340
341 def statusCheck(self, user, tags, productId):
342 mon = pymongo.MongoClient(host=config.host, port=config.mongoPort)
343 try:
344 db = mon["insta_process"]
345 collection = db["process"]
346 temp = {}
347 temp["user"] = user
348 temp["tags"] = tags
349 temp["productId"] = productId
350 records = collection.find(temp).count()
351 if records == 0:
352 result = False
353 else:
354 result = True
355 except Exception as err:
356 print(f"exception : {err}\n")
357 print("error::dbProcessReader:>>", sys.exc_info()[1])
358 finally:
359 mon.close()
360 return result
361
362
363class DBDataFetcher:

Callers 1

getMethod · 0.95

Calls 2

countMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected