ocrd_network.utils module¶
- ocrd_network.utils.calculate_execution_time(start: datetime, end: datetime) int [source]¶
Calculates the difference between start and end datetime. Returns the result in milliseconds
- ocrd_network.utils.generate_id() str [source]¶
Generate the id to be used for processing job ids. Note, workspace_id and workflow_id in the reference WebAPI implementation are produced in the same manner
- ocrd_network.utils.verify_and_parse_mq_uri(rabbitmq_address: str)[source]¶
Check the full list of available parameters in the docs here: https://pika.readthedocs.io/en/stable/_modules/pika/connection.html#URLParameters
- ocrd_network.utils.post_to_callback_url(logger, callback_url: str, result_message: OcrdResultMessage)[source]¶
- ocrd_network.utils.get_ocrd_workspace_instance(mets_path: str, mets_server_url: str | None = None) Workspace [source]¶