create thread_number and file_path params

This commit is contained in:
2024-04-24 13:48:55 +02:00
parent 1f4de00259
commit 09cd5007da
+4 -4
View File
@@ -69,12 +69,12 @@ def send_appointment_request(message_queue_name, _contact_list):
receiver.run()
def start_send_requests():
def start_send_requests(thread_number=5, file_path='~/Desktop/24_04_to_test.xlsx'):
print("start send requests")
contacts_file_path = '~/Desktop/contact_list_merged.xlsx'
contacts_file_path = file_path
_contact_list = read_contacts(contacts_file_path)
_contact_list_to_book = filter_contacts(_contact_list)
_segment_number = 20
_segment_number = thread_number
logger.info("{} contacts to book".format(len(_contact_list_to_book)))
last_thread = None
for i in range(0, _segment_number):
@@ -88,4 +88,4 @@ def start_send_requests():
if __name__ == '__main__':
start_send_requests()
start_send_requests(thread_number=5, file_path='~/Desktop/24_04_to_test.xlsx')