in ees_microsoft_outlook/full_sync_command.py [0:0]
def start_producer(self, queue):
"""This method starts async calls for the Producer which is responsible for fetching documents from
the Microsoft Outlook and pushing them in the shared queue
:param queue: Shared queue to fetch the stored documents
"""
thread_count = self.config.get_value("microsoft_outlook_sync_thread_count")
users_accounts = self.get_accounts()
sync_microsoft_outlook = SyncMicrosoftOutlook(
self.config,
self.logger,
self.workplace_search_custom_client,
queue,
)
start_time, end_time = (
self.config.get_value("start_time"),
CURRENT_TIME,
)
# Logic to fetch mails, calendars, contacts and task from Microsoft Outlook by using multithreading approach
time_range_list = self.get_datetime_iterable_list(start_time, end_time)
self.create_jobs_for_mails(
FULL_SYNC_INDEXING,
sync_microsoft_outlook,
thread_count,
users_accounts,
time_range_list,
end_time,
queue,
)
self.create_jobs_for_calendar(
FULL_SYNC_INDEXING,
sync_microsoft_outlook,
thread_count,
users_accounts,
time_range_list,
end_time,
queue,
)
self.create_jobs_for_contacts(
FULL_SYNC_INDEXING,
sync_microsoft_outlook,
thread_count,
users_accounts,
time_range_list,
end_time,
queue,
)
self.create_jobs_for_tasks(
FULL_SYNC_INDEXING,
sync_microsoft_outlook,
thread_count,
users_accounts,
time_range_list,
end_time,
queue,
)
self.pass_end_signal(queue)