Skip to content

workflows.v2#

zen_api.workflows.v2 #

Classes:

JobStatus #

Bases: Enum

Runtime status of the Job.

Attributes:

  • UNSPECIFIED –

    Default value if status is not specified.

  • RUNNING –

    Job is currently executed by the workflow runner.

  • PAUSED –

    Job execution is paused (not supported for now and reserved only for future purposes

  • COMPLETED –

    Job execution is successfully completed.

  • FAILED –

    Job execution was failed.

  • CANCELLED –

    Job execution was interrupted (cancelled).

  • PENDING –

    Job is created but still not started and waiting for beginning of execution.

UNSPECIFIED class-attribute instance-attribute #

UNSPECIFIED = 0

Default value if status is not specified.

RUNNING class-attribute instance-attribute #

RUNNING = 1

Job is currently executed by the workflow runner.

PAUSED class-attribute instance-attribute #

PAUSED = 2

Job execution is paused (not supported for now and reserved only for future purposes for saving numeration sequence).

COMPLETED class-attribute instance-attribute #

COMPLETED = 3

Job execution is successfully completed.

FAILED class-attribute instance-attribute #

FAILED = 4

Job execution was failed.

CANCELLED class-attribute instance-attribute #

CANCELLED = 5

Job execution was interrupted (cancelled).

PENDING class-attribute instance-attribute #

PENDING = 6

Job is created but still not started and waiting for beginning of execution.

JobInfo dataclass #

JobInfo(job_id: str = betterproto.string_field(1), create_date: datetime = betterproto.message_field(2), status: JobStatus = betterproto.enum_field(3), start_options: StartJobOptions = betterproto.message_field(4))

Bases: Message

Information about Job executed by the workflow runner contains a real-time updates and Job's events with Job state.

Attributes:

job_id class-attribute instance-attribute #

job_id: str = betterproto.string_field(1)

A Job unique runtime ID.

create_date class-attribute instance-attribute #

create_date: datetime = betterproto.message_field(2)

A date and time when JobInfo was created.

status class-attribute instance-attribute #

status: JobStatus = betterproto.enum_field(3)

A Job execution state.

start_options class-attribute instance-attribute #

start_options: StartJobOptions = betterproto.message_field(4)

A Job starting options.

WorkflowServiceGetJobInfoRequest dataclass #

WorkflowServiceGetJobInfoRequest(job_id: str = betterproto.string_field(1))

Bases: Message

The WorkflowServiceGetJobInfoRequest class.

Attributes:

  • job_id (str) –

    Target Job ID.

job_id class-attribute instance-attribute #

job_id: str = betterproto.string_field(1)

Target Job ID.

WorkflowServiceGetJobInfoResponse dataclass #

WorkflowServiceGetJobInfoResponse(job_info: JobInfo = betterproto.message_field(1))

Bases: Message

Response object representing the job info.

Attributes:

job_info class-attribute instance-attribute #

job_info: JobInfo = betterproto.message_field(1)

The job info.

WorkflowServiceStartJobRequest dataclass #

WorkflowServiceStartJobRequest(job_name: str = betterproto.string_field(1), options: StartJobOptions = betterproto.message_field(2))

Bases: Message

The WorkflowServiceStartJobRequest class.

Attributes:

job_name class-attribute instance-attribute #

job_name: str = betterproto.string_field(1)

Job display name.

options class-attribute instance-attribute #

options: StartJobOptions = betterproto.message_field(2)

Job starting options.

WorkflowServiceStartJobResponse dataclass #

WorkflowServiceStartJobResponse(job_info: JobInfo = betterproto.message_field(1))

Bases: Message

Response object representing the starting of a job.

Attributes:

job_info class-attribute instance-attribute #

job_info: JobInfo = betterproto.message_field(1)

The job info.

WorkflowServiceStopJobRequest dataclass #

WorkflowServiceStopJobRequest(job_id: str = betterproto.string_field(1))

Bases: Message

The WorkflowServiceStopJobRequest class.

Attributes:

  • job_id (str) –

    Target Job ID.

job_id class-attribute instance-attribute #

job_id: str = betterproto.string_field(1)

Target Job ID.

WorkflowServiceStopJobResponse dataclass #

WorkflowServiceStopJobResponse()

Bases: Message

The WorkflowServiceStopJobResponse class.

WorkflowServiceWaitJobRequest dataclass #

WorkflowServiceWaitJobRequest(job_id: str = betterproto.string_field(1))

Bases: Message

The WorkflowServiceWaitJobRequest class.

Attributes:

  • job_id (str) –

    Target Job ID.

job_id class-attribute instance-attribute #

job_id: str = betterproto.string_field(1)

Target Job ID.

WorkflowServiceWaitJobResponse dataclass #

WorkflowServiceWaitJobResponse()

Bases: Message

The WorkflowServiceWaitJobResponse class.

WorkflowServiceStub #

Bases: ServiceStub

Methods:

get_job_info async #

get_job_info(workflow_service_get_job_info_request: WorkflowServiceGetJobInfoRequest, *, timeout: Optional[float] = None, deadline: Optional[Deadline] = None, metadata: Optional[MetadataLike] = None) -> WorkflowServiceGetJobInfoResponse

Get Job information.

start_job async #

start_job(workflow_service_start_job_request: WorkflowServiceStartJobRequest, *, timeout: Optional[float] = None, deadline: Optional[Deadline] = None, metadata: Optional[MetadataLike] = None) -> WorkflowServiceStartJobResponse

Start Job execution.

stop_job async #

stop_job(workflow_service_stop_job_request: WorkflowServiceStopJobRequest, *, timeout: Optional[float] = None, deadline: Optional[Deadline] = None, metadata: Optional[MetadataLike] = None) -> WorkflowServiceStopJobResponse

Stop the Job execution.

wait_job async #

wait_job(workflow_service_wait_job_request: WorkflowServiceWaitJobRequest, *, timeout: Optional[float] = None, deadline: Optional[Deadline] = None, metadata: Optional[MetadataLike] = None) -> WorkflowServiceWaitJobResponse

Wait for the Job execution will be finished.

WorkflowServiceBase #

Bases: ServiceBase

Methods:

get_job_info async #

get_job_info(workflow_service_get_job_info_request: WorkflowServiceGetJobInfoRequest) -> WorkflowServiceGetJobInfoResponse

Get Job information.

start_job async #

start_job(workflow_service_start_job_request: WorkflowServiceStartJobRequest) -> WorkflowServiceStartJobResponse

Start Job execution.

stop_job async #

stop_job(workflow_service_stop_job_request: WorkflowServiceStopJobRequest) -> WorkflowServiceStopJobResponse

Stop the Job execution.

wait_job async #

wait_job(workflow_service_wait_job_request: WorkflowServiceWaitJobRequest) -> WorkflowServiceWaitJobResponse

Wait for the Job execution will be finished.