Job

pydantic model safir.uws.Job

A single UWS job with deserialized parameters.

Parameters:

data (Any)

Fields:
field parameters: Annotated[P, Field(title='Job parameters', description='Job parameters converted to their Pydantic model. Use json_parameters for the serialized form sent over the wire.', exclude=True)] [Required]

Job parameters converted to their Pydantic model. Use json_parameters for the serialized form sent over the wire.

classmethod from_serialized_job(job, parameters_type)

Convert from a serialized job returned by Wobbly.

Parameters:
  • job (SerializedJob) – Serialized job from Wobbly.

  • parameters_type (type[TypeVar(P, bound= ParametersModel)]) – Model to use for job parameters.

Returns:

Job with the correct parameters model.

Return type:

Job

Raises:

pydantic.ValidationError – Raised if the serialized parameters cannot be validated.

to_serialized_job()

Convert to a serialized job suitable for sending to Wobbly.

Return type:

SerializedJob

to_xml_model(job_summary_type)

Convert to a Pydantic XML model.

Parameters:

job_summary_type (type[TypeVar(S, bound= JobSummary)]) – XML model class for the job summary.

Returns:

XML model corresponding to this job.

Return type:

vo_models.uws.models.JobSummary