From 0c6d276f8277fb955bd5f290767c958c844fdcf8 Mon Sep 17 00:00:00 2001 From: PAN Lei Date: Thu, 25 Apr 2024 20:49:23 +0200 Subject: [PATCH] use 25 segments --- request_sender.py | 4 ++-- request_sender_test.py | 7 ++----- scheduler_test.py | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/request_sender.py b/request_sender.py index cb36878..14ea7ab 100644 --- a/request_sender.py +++ b/request_sender.py @@ -71,10 +71,10 @@ def send_appointment_request(message_queue_name, _contact_list): def start_send_requests(): print("start send requests") - contacts_file_path = '~/Desktop/contact_list_2024-04-16_2.xlsx' + contacts_file_path = '~/Desktop/contact_list_2024-04-19.xlsx' _contact_list = read_contacts(contacts_file_path) _contact_list_to_book = filter_contacts(_contact_list) - _segment_number = 10 + _segment_number = 1 logger.info("{} contacts to book".format(len(_contact_list_to_book))) last_thread = None for i in range(0, _segment_number): diff --git a/request_sender_test.py b/request_sender_test.py index 9734030..227b894 100644 --- a/request_sender_test.py +++ b/request_sender_test.py @@ -12,9 +12,6 @@ from utiles import is_time_between from utils.AppLogging import init_logger from workers.proxies_constants import MOBILE_PROXY_LIST_FR -IPFIY = 'http://api.ipify.org' -NGROK_TEST = "https://bcc6-193-164-156-53.ngrok-free.app" - def is_already_sent(contact: ContactPojo) -> bool: already_sent_contacts = MONGO_STORE_MANAGER.get_all_successful_items_for_day() @@ -69,7 +66,7 @@ def send_appointment_request(message_queue_name, _contact_list): receiver.run() -def start_send_requests(thread_number=5, file_path='~/Desktop/24_04_to_test.xlsx'): +def start_send_requests(thread_number, file_path): print("start send requests") contacts_file_path = file_path _contact_list = read_contacts(contacts_file_path) @@ -88,4 +85,4 @@ def start_send_requests(thread_number=5, file_path='~/Desktop/24_04_to_test.xlsx if __name__ == '__main__': - start_send_requests(thread_number=5, file_path='~/Desktop/24_04_to_test.xlsx') + start_send_requests(thread_number=25, file_path='~/Desktop/24_04_to_test.xlsx') diff --git a/scheduler_test.py b/scheduler_test.py index 28144d7..47e5c3d 100644 --- a/scheduler_test.py +++ b/scheduler_test.py @@ -5,7 +5,7 @@ from request_sender_test import start_send_requests def start_book_appointment(): - start_send_requests() + start_send_requests(thread_number=25, file_path='~/Desktop/contact_list_2024-04-24.xlsx') def start_check_results_job(sched):