no need to use executor

This commit is contained in:
2022-12-09 11:01:22 +01:00
parent bdb250f03b
commit 1bd8435163
+12 -12
View File
@@ -191,18 +191,18 @@ def read_mails():
mail_reader = MailReader(mail.mail, mail.password)
executor.submit(mail_reader.read_emails, mails_messages)
with ThreadPoolExecutor(max_workers=10) as executor:
for mail in mails_messages:
match = re.search(VALIDATION_URL_REGEX, mail.body)
if match:
url = match.group(0)
if need_to_valid_url(url, successful_items):
MONGO_STORE_MANAGER.save_links_to_validate(url)
# url_validator = LinkValidator(url)
# print("need to validate url: " + url)
# executor.submit(url_validator.start_page, params.get_proxy(ProxyType.OXYLABS), False)
else:
print("do not need to click url --> {}".format(mail.mail_address))
# with ThreadPoolExecutor(max_workers=10) as executor:
for mail in mails_messages:
match = re.search(VALIDATION_URL_REGEX, mail.body)
if match:
url = match.group(0)
if need_to_valid_url(url, successful_items):
MONGO_STORE_MANAGER.save_links_to_validate(url)
# url_validator = LinkValidator(url)
# print("need to validate url: " + url)
# executor.submit(url_validator.start_page, params.get_proxy(ProxyType.OXYLABS), False)
else:
print("do not need to click url --> {}".format(mail.mail_address))
# check whether the url has already been clicked