SerializedJob#

pydantic model safir.uws.SerializedJob#

A single UWS job (Wobbly format).

Parameters:

data (Any)

Fields:
field creation_time: Annotated[TypeAliasType] [Required]#

When the job was created

field destruction_time: Annotated[UtcDatetime, Field(title='Destruction time', description='At this time, the job will be aborted if it is still running, its results will be deleted, and it will either change phase to ARCHIVED or all record of the job will be discarded', examples=['2024-11-29T23:57:55+00:00'])] [Required]#

At this time, the job will be aborted if it is still running, its results will be deleted, and it will either change phase to ARCHIVED or all record of the job will be discarded

field end_time: Annotated[TypeAliasType | None] = None#

When the job stopped executing (if it has)

field errors: Annotated[list[JobError]] = []#

Error information if the job failed

field execution_duration: Annotated[SecondsTimedelta | None, Field(title='Maximum execution duration', description='Allowed maximum execution duration. This is specified in elapsed wall clock time (not CPU time). If null, the execution time is unlimited. If the job runs for longer than this time period, it will be aborted.'), PlainSerializer(lambda t: ..., return_type=int)] = None#

Allowed maximum execution duration. This is specified in elapsed wall clock time (not CPU time). If null, the execution time is unlimited. If the job runs for longer than this time period, it will be aborted.

Constraints:
  • func = <function JobBase.<lambda> at 0x7fa51a51cc20>

  • return_type = <class ‘int’>

  • when_used = always

field id: Annotated[str] [Required]#

Unique identifier of the job

Constraints:
  • func = <function SerializedJob.<lambda> at 0x7fa51a51e980>

  • json_schema_input_type = PydanticUndefined

field json_parameters: Annotated[dict[str, Any], Field(title='Job parameters', description='May be any JSON-serialized object. Stored opaquely and returned as part of the job record.', examples=[{'ids': ['data-id'], 'stencils': [{'type': 'circle', 'center': [1.1, 2.1], 'radius': 0.001}]}])] [Required]#

May be any JSON-serialized object. Stored opaquely and returned as part of the job record.

field message_id: Annotated[str | None] = None#

Internal message identifier for the work queuing system. Only meaningful to the service that stored this ID.

field owner: Annotated[str] [Required]#

Identity of the owner of the job

field phase: Annotated[ExecutionPhase] [Required]#

Current execution phase of the job

field quote: Annotated[TypeAliasType | None] = None#

Expected completion time of the job if it were started now, or null to indicate that the expected duration is not known. If later than the destruction time, indicates that the job is not possible due to resource constraints.

field results: Annotated[list[JobResult]] = []#

Results of the job, if it has finished

field run_id: Annotated[str | None, Field(title='Client-provided run ID', description='The run ID allows the client to add a unique identifier to all jobs that are part of a single operation, which may aid in tracing issues through a complex system or identifying which operation a job is part of', examples=['daily-2024-10-29'])] = None#

The run ID allows the client to add a unique identifier to all jobs that are part of a single operation, which may aid in tracing issues through a complex system or identifying which operation a job is part of

field service: Annotated[str] [Required]#

Service responsible for this job

field start_time: Annotated[TypeAliasType | None] = None#

When the job started executing (if it has)

to_job_description(base_url)#

Convert to the Pydantic XML model used for the summary of jobs.

Parameters:

base_url (str) – Base URL for the full jobs.

Return type:

ShortJobDescription