| 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 | |
| 363 | class DBDataFetcher: |