Abstraction for the Processing Server unit in this arch: https://user-images.githubusercontent.com/7795705/203554094-62ce135a-b367-49ba-9960-ffe1b7d39b2c.jpg
Calls to native OCR-D processor should happen through the Processing Worker wrapper to hide low level details. According to the current requirements, each ProcessingWorker is a single OCR-D Processor instance.
- class ocrd_network.processing_worker.ProcessingWorker(rabbitmq_addr, mongodb_addr, processor_name, ocrd_tool: dict, processor_class=None)¶
- connect_consumer() None ¶
- connect_publisher(enable_acks: bool = True) None ¶
- on_consumed_message(channel: BlockingChannel, delivery: Deliver, properties: BasicProperties, body: bytes) None ¶
- start_consuming() None ¶
- create_queue(connection_attempts: int = 3, retry_delay: int = 3) None ¶
Create the queue for this worker
Originally only the processing-server created the queues for the workers according to the configuration file. This is intended to make external deployment of workers possible.