more threads for link validation
This commit is contained in:
@@ -9,6 +9,7 @@ from mail.mail_reader_all_contacts import find_links_to_validate_from_mail_list
|
||||
from models.mail_pojo import MailAddress
|
||||
|
||||
host = "https://authhk.bhdata.com:30015/bhmailer?uid=482391396&sign=32d7748da00047b9a1054c81a5750365"
|
||||
is_checking = False
|
||||
|
||||
HERMES_EMAIL = "no-reply@hermes.com"
|
||||
|
||||
@@ -92,6 +93,9 @@ def check_confirmed_mails():
|
||||
|
||||
|
||||
def check_all_need_to_check_emails():
|
||||
global is_checking
|
||||
if not is_checking:
|
||||
is_checking = True
|
||||
logger = logging.getLogger()
|
||||
_mail_list_before_filter = get_mail_list_to_check()
|
||||
_mails = filter_mail_with_links(_mail_list_before_filter)
|
||||
@@ -102,6 +106,7 @@ def check_all_need_to_check_emails():
|
||||
|
||||
_mail_list = [MailAddress("saigecong1990@pissmail.com", "cvExXKOP8oY1D@")]
|
||||
find_links_to_validate_from_mail_list(_mail_list, logger)
|
||||
is_checking = False
|
||||
|
||||
|
||||
def try_to_check_all_mails():
|
||||
@@ -117,7 +122,7 @@ def try_to_check_all_mails():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# check_all_need_to_check_emails()
|
||||
try_to_check_all_mails()
|
||||
check_all_need_to_check_emails()
|
||||
# try_to_check_all_mails()
|
||||
# check_confirmed_mails()
|
||||
# check_appointment_link_mail("hcunlvi533@outlook.com")
|
||||
|
||||
@@ -101,8 +101,12 @@ if __name__ == '__main__':
|
||||
# '~/Desktop/contact_list_2024-05-21.xlsx',
|
||||
# '~/Desktop/15_05_to_test.xlsx']
|
||||
# file_list = ['~/Desktop/15_05_to_test.xlsx', '~/Desktop/16_05_to_test.xlsx']
|
||||
file_list = ['~/Desktop/contact_list_2025-07-11.xlsx']
|
||||
# file_list = ['~/Desktop/contact_list_all_studio.xlsx']
|
||||
# file_list = ['~/Desktop/contact_list_2025-07-15.xlsx']
|
||||
# file_list = ['~/Desktop/contact_list_2025-07-28.xlsx']
|
||||
# file_list = ['~/Desktop/contact_list_2025-06-23.xlsx']
|
||||
# file_list = ['~/Desktop/contact_list_2025-03-11.xlsx']
|
||||
# file_list = ['~/Desktop/contact_list_2025-05-21.xlsx']
|
||||
file_list = ['~/Desktop/contact_list_2025-08-14.xlsx']
|
||||
# file_list = ['~/Desktop/real_name_contacts_100_27_06.xlsx']
|
||||
send_request_for_file_list(file_list=file_list, thread_number=20,
|
||||
send_request_for_file_list(file_list=file_list, thread_number=10,
|
||||
data_queue_name=MORNING_DATA_CACHE, stop_at_hour=19, stop_at_mins=50)
|
||||
|
||||
@@ -241,8 +241,8 @@ def validate_all_links(_contact_serial_list):
|
||||
# else:
|
||||
# _segment_number = 1
|
||||
_thread_list = []
|
||||
if len(_first_25_percent_links) >= 10:
|
||||
_segment_number = 10
|
||||
if len(_first_25_percent_links) >= 20:
|
||||
_segment_number = 20
|
||||
else:
|
||||
_segment_number = len(_first_25_percent_links)
|
||||
for i in range(0, _segment_number):
|
||||
|
||||
Reference in New Issue
Block a user