Beispiel #1
0
def proto_to_job(proto: JobProto) -> JobInfo:
    if proto is None:
        return None
    else:
        return JobInfo(job_name=proto.name,
                       state=ProtoToMeta.proto_to_state(proto.job_state),
                       workflow_execution=proto_to_workflow_execution(
                           proto.workflow_execution))
Beispiel #2
0
def proto_to_workflow_execution(
        proto: WorkflowExecutionProto) -> WorkflowExecutionInfo:
    if proto is None:
        return None
    else:
        return WorkflowExecutionInfo(
            execution_id=proto.execution_id,
            state=ProtoToMeta.proto_to_state(proto.execution_state),
            workflow_info=proto_to_workflow(proto.workflow))
Beispiel #3
0
 def updateWorkflowExecutionState(self, request, context):
     _state = ProtoToMeta.proto_to_state(request.state)
     uuid = self.store.update_workflow_execution_state(_state, request.name)
     return _wrap_update_response(uuid)
Beispiel #4
0
 def updateJobState(self, request, context):
     _state = ProtoToMeta.proto_to_state(request.state)
     uuid = self.store.update_job_state(_state, request.name)
     return _wrap_update_response(uuid)