ocrd_network.models.job module

class ocrd_network.models.job.PYJobInput(*, processor_name: str | None = None, path_to_mets: str | None = None, workspace_id: str | None = None, description: str | None = None, input_file_grps: List[str], output_file_grps: List[str] | None = None, page_id: str | None = None, parameters: dict = {}, result_queue_name: str | None = None, callback_url: str | None = None, agent_type: AgentType = AgentType.PROCESSING_WORKER, job_id: str | None = None, depends_on: List[str] | None = None)[source]

Bases: BaseModel

Wraps the parameters required to make a run-processor-request

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

processor_name: str | None
path_to_mets: str | None
workspace_id: str | None
description: str | None
input_file_grps: List[str]
output_file_grps: List[str] | None
page_id: str | None
parameters: dict
result_queue_name: str | None
callback_url: str | None
agent_type: AgentType
job_id: str | None
depends_on: List[str] | None
class Config[source]

Bases: object

schema_extra = {'example': {'agent_type': AgentType.PROCESSING_WORKER, 'description': 'The description of this execution', 'input_file_grps': ['DEFAULT'], 'output_file_grps': ['OCR-D-BIN'], 'page_id': 'PHYS_0001..PHYS_0003', 'parameters': {}, 'path_to_mets': '/path/to/mets.xml'}}
class ocrd_network.models.job.PYJobOutput(*, job_id: str, processor_name: str, state: JobState = JobState.unset, path_to_mets: str | None = None, workspace_id: str | None = None, input_file_grps: List[str], output_file_grps: List[str] | None = None, page_id: str | None = None, log_file_path: str | None = None)[source]

Bases: BaseModel

Wraps output information for a job-response

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

job_id: str
processor_name: str
state: JobState
path_to_mets: str | None
workspace_id: str | None
input_file_grps: List[str]
output_file_grps: List[str] | None
page_id: str | None
log_file_path: str | None
class ocrd_network.models.job.DBProcessorJob(*args, _id: PydanticObjectId | None = None, revision_id: UUID | None = None, job_id: str, processor_name: str, path_to_mets: str | None = None, workspace_id: str | None = None, description: str | None = None, state: JobState = JobState.unset, input_file_grps: List[str], output_file_grps: List[str] | None = None, page_id: str | None = None, parameters: dict | None = None, depends_on: List[str] | None = None, result_queue_name: str | None = None, callback_url: str | None = None, internal_callback_url: str | None = None, start_time: datetime | None = None, end_time: datetime | None = None, exec_time: str | None = None, log_file_path: str | None = None)[source]

Bases: Document

Job representation in the database

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

job_id: str
processor_name: str
path_to_mets: str | None
workspace_id: str | None
description: str | None
state: JobState
input_file_grps: List[str]
output_file_grps: List[str] | None
page_id: str | None
parameters: dict | None
depends_on: List[str] | None
result_queue_name: str | None
callback_url: str | None
internal_callback_url: str | None
start_time: datetime | None
end_time: datetime | None
exec_time: str | None
log_file_path: str | None
class Settings[source]

Bases: object

use_enum_values = True
to_job_output() PYJobOutput[source]
id: PydanticObjectId | None
revision_id: UUID | None
class ocrd_network.models.job.PYWorkflowJobOutput(*, processing_job_ids: Dict[str, List[str]], page_id: str, page_wise: bool = False, job_id: str, path_to_mets: str | None = None, workspace_id: str | None = None, description: str | None = None)[source]

Bases: BaseModel

Wraps output information for a workflow job-response

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

processing_job_ids: Dict[str, List[str]]
page_id: str
page_wise: bool
job_id: str
path_to_mets: str | None
workspace_id: str | None
description: str | None
class ocrd_network.models.job.DBWorkflowJob(*args, _id: PydanticObjectId | None = None, revision_id: UUID | None = None, job_id: str, page_id: str, page_wise: bool = False, processing_job_ids: Dict, path_to_mets: str | None = None, workspace_id: str | None = None, description: str | None = None, workflow_callback_url: str | None = None)[source]

Bases: Document

Workflow job representation in the database

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

job_id: str
page_id: str
page_wise: bool
processing_job_ids: Dict
path_to_mets: str | None
workspace_id: str | None
description: str | None
workflow_callback_url: str | None
class Settings[source]

Bases: object

use_enum_values = True
to_job_output() PYWorkflowJobOutput[source]
id: PydanticObjectId | None
revision_id: UUID | None