add sleep to lan helper
This commit is contained in:
+13
-1
@@ -1,4 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
|
import random
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
@@ -70,6 +71,15 @@ def get_mail_list_to_check():
|
|||||||
return _mail_list
|
return _mail_list
|
||||||
|
|
||||||
|
|
||||||
|
def check_confirmed_mails():
|
||||||
|
successful_items = MONGO_STORE_MANAGER.get_all_successful_items_for_day()
|
||||||
|
# _mail_list = []
|
||||||
|
for _item in successful_items:
|
||||||
|
if "outlook" in _item.email or "hotmail" in _item.email:
|
||||||
|
check_mail(_item.email)
|
||||||
|
time.sleep(random.randint(1, 5))
|
||||||
|
|
||||||
|
|
||||||
def check_all_need_to_check_emails():
|
def check_all_need_to_check_emails():
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
_mail_list_before_filter = get_mail_list_to_check()
|
_mail_list_before_filter = get_mail_list_to_check()
|
||||||
@@ -77,10 +87,12 @@ def check_all_need_to_check_emails():
|
|||||||
for _mail in _mails:
|
for _mail in _mails:
|
||||||
if "outlook.com" in _mail or "hotmail.com" in _mail:
|
if "outlook.com" in _mail or "hotmail.com" in _mail:
|
||||||
check_mail(_mail)
|
check_mail(_mail)
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
_mail_list = [MailAddress("saigecong1990@pissmail.com", "cvExXKOP8oY1D@")]
|
_mail_list = [MailAddress("saigecong1990@pissmail.com", "cvExXKOP8oY1D@")]
|
||||||
find_links_to_validate_from_mail_list(_mail_list, logger)
|
find_links_to_validate_from_mail_list(_mail_list, logger)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
check_all_need_to_check_emails()
|
# check_all_need_to_check_emails()
|
||||||
|
check_confirmed_mails()
|
||||||
|
|||||||
@@ -101,7 +101,8 @@ if __name__ == '__main__':
|
|||||||
# '~/Desktop/contact_list_2024-05-21.xlsx',
|
# '~/Desktop/contact_list_2024-05-21.xlsx',
|
||||||
# '~/Desktop/15_05_to_test.xlsx']
|
# '~/Desktop/15_05_to_test.xlsx']
|
||||||
# file_list = ['~/Desktop/15_05_to_test.xlsx', '~/Desktop/16_05_to_test.xlsx']
|
# file_list = ['~/Desktop/15_05_to_test.xlsx', '~/Desktop/16_05_to_test.xlsx']
|
||||||
# file_list = ['~/Desktop/contact_list_2025-06-24.xlsx']
|
file_list = ['~/Desktop/contact_list_2025-07-11.xlsx']
|
||||||
file_list = ['~/Desktop/real_name_contacts_100_27_06.xlsx']
|
# file_list = ['~/Desktop/contact_list_all_studio.xlsx']
|
||||||
send_request_for_file_list(file_list=file_list, thread_number=2,
|
# file_list = ['~/Desktop/real_name_contacts_100_27_06.xlsx']
|
||||||
|
send_request_for_file_list(file_list=file_list, thread_number=20,
|
||||||
data_queue_name=MORNING_DATA_CACHE, stop_at_hour=19, stop_at_mins=50)
|
data_queue_name=MORNING_DATA_CACHE, stop_at_hour=19, stop_at_mins=50)
|
||||||
|
|||||||
+2
-2
@@ -6,8 +6,8 @@ from request_sender_test import send_request_for_file_list
|
|||||||
|
|
||||||
|
|
||||||
def start_book_appointment():
|
def start_book_appointment():
|
||||||
file_list = ['~/Desktop/contact_list_2025-06-27.xlsx']
|
file_list = ['~/Desktop/contact_list_2025-07-11.xlsx']
|
||||||
send_request_for_file_list(file_list=file_list, thread_number=50,
|
send_request_for_file_list(file_list=file_list, thread_number=60,
|
||||||
data_queue_name=MORNING_DATA_CACHE, stop_at_hour=11, stop_at_mins=20)
|
data_queue_name=MORNING_DATA_CACHE, stop_at_hour=11, stop_at_mins=20)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user