stop after playright stop

This commit is contained in:
2022-05-11 23:13:39 +02:00
parent d37aff124a
commit 73023e9db9
6 changed files with 9 additions and 9 deletions
+4 -1
View File
@@ -16,7 +16,10 @@ logger.addHandler(logging.StreamHandler(stream=sys.stdout))
def start_book(start_number, end_number, store_choose_state=0, max_workers=10):
# read the contact, and contact the 2 objects together
excel_reader = ExcelHelper()
contacts = excel_reader.read_contacts()[start_number - 1: end_number]
all_contacts = excel_reader.read_contacts()
if len(all_contacts) <= end_number:
end_number = len(all_contacts)
contacts = all_contacts[start_number - 1: end_number]
logger.info(contacts)
with ThreadPoolExecutor(max_workers=max_workers) as executor:
for contact in contacts: