use 25 segments
This commit is contained in:
+2
-2
@@ -71,10 +71,10 @@ def send_appointment_request(message_queue_name, _contact_list):
|
|||||||
|
|
||||||
def start_send_requests():
|
def start_send_requests():
|
||||||
print("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 = read_contacts(contacts_file_path)
|
||||||
_contact_list_to_book = filter_contacts(_contact_list)
|
_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)))
|
logger.info("{} contacts to book".format(len(_contact_list_to_book)))
|
||||||
last_thread = None
|
last_thread = None
|
||||||
for i in range(0, _segment_number):
|
for i in range(0, _segment_number):
|
||||||
|
|||||||
@@ -12,9 +12,6 @@ from utiles import is_time_between
|
|||||||
from utils.AppLogging import init_logger
|
from utils.AppLogging import init_logger
|
||||||
from workers.proxies_constants import MOBILE_PROXY_LIST_FR
|
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:
|
def is_already_sent(contact: ContactPojo) -> bool:
|
||||||
already_sent_contacts = MONGO_STORE_MANAGER.get_all_successful_items_for_day()
|
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()
|
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")
|
print("start send requests")
|
||||||
contacts_file_path = file_path
|
contacts_file_path = file_path
|
||||||
_contact_list = read_contacts(contacts_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__':
|
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')
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ from request_sender_test import start_send_requests
|
|||||||
|
|
||||||
|
|
||||||
def start_book_appointment():
|
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):
|
def start_check_results_job(sched):
|
||||||
|
|||||||
Reference in New Issue
Block a user