update cfpfe and stcfp data to 4.24.3
This commit is contained in:
+4
-4
@@ -6,7 +6,7 @@ from threading import Thread
|
||||
from db.mongo_manager import MONGO_STORE_MANAGER
|
||||
from excel_reader import read_contacts
|
||||
from models.contact_pojo import ContactPojo
|
||||
from queue_message.CookiesPublisher import CookiesPublisher, TEST_QUEUE
|
||||
from queue_message.CookiesPublisher import CookiesPublisher, SHARED_OBJECT, TEST_QUEUE
|
||||
from queue_message.appointmentrequestsender import AppointmentRequestSender
|
||||
from utiles import is_time_between
|
||||
from utils.AppLogging import init_logger
|
||||
@@ -64,17 +64,17 @@ def send_appointment_request(message_queue_name, _contact_list):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
contacts_file_path = '~/Desktop/contact_list_2024-03-19.xlsx'
|
||||
contacts_file_path = '~/Desktop/contact_list_2024-03-26-2.xlsx'
|
||||
_contact_list = read_contacts(contacts_file_path)
|
||||
_contact_list_to_book = filter_contacts(_contact_list)
|
||||
_segment_number = 1
|
||||
_segment_number = 5
|
||||
logger.info("{} contacts to book".format(len(_contact_list_to_book)))
|
||||
last_thread = None
|
||||
for i in range(0, _segment_number):
|
||||
logger.info("segment is {}".format(i))
|
||||
_step = int(len(_contact_list_to_book) / _segment_number)
|
||||
_sublist = _contact_list_to_book[i * _step:_step * (i + 1)]
|
||||
_thread1 = Thread(target=send_appointment_request, args=(TEST_QUEUE, _sublist))
|
||||
_thread1 = Thread(target=send_appointment_request, args=(SHARED_OBJECT, _sublist))
|
||||
last_thread = _thread1
|
||||
_thread1.start()
|
||||
last_thread.join()
|
||||
|
||||
Reference in New Issue
Block a user