def search(document_path, request): args = (document_path, request) process = QueueProcess(target=_tools.do_search_book, args=args, name="bookworm-search") process.start() while True: value = process.queue.get() if value == -1: break yield value process.join()
def export_to_text(document_path, target_filename): args = (document_path, target_filename) process = QueueProcess(target=_tools.do_export_to_text, args=args, name="bookworm-exporter") process.start() while True: value = process.queue.get() if value == -1: break yield value process.join()