optimize check_results.py
This commit is contained in:
+2
-3
@@ -116,11 +116,10 @@ if __name__ == '__main__':
|
|||||||
reserve_pojo = ReserveResultPojo.from_firestore_dict(appointment.to_dict())
|
reserve_pojo = ReserveResultPojo.from_firestore_dict(appointment.to_dict())
|
||||||
result_list.append(reserve_pojo)
|
result_list.append(reserve_pojo)
|
||||||
|
|
||||||
with ThreadPoolExecutor(max_workers=5) as executor:
|
with ThreadPoolExecutor(max_workers=20) as executor:
|
||||||
for reserve in result_list:
|
for reserve in result_list:
|
||||||
count = count + 1
|
count = count + 1
|
||||||
if reserve.accepted is None:
|
if reserve.accepted is None or ResultEnum.PENDING.value == reserve.accepted:
|
||||||
# or ResultEnum.PENDING.value == reserve.accepted:
|
|
||||||
if reserve.url != BLANK_URL:
|
if reserve.url != BLANK_URL:
|
||||||
executor.submit(ResultChecker().run, reserve, collection)
|
executor.submit(ResultChecker().run, reserve, collection)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user