Getting the Status of Workflows
After initialization, Python can leverage the Fuzzball API by referencing the variable
api_instance
. The code snippet below uses the Fuzzball API to get the status of
workflow using its UUID.
workflow_uuid="f3854a71-cd36-444f-b91f-e95e27f03a87"
response = api_instance.get_workflow_status(id=workflow_uuid)
if not isinstance(response, fuzzball.GetWorkflowStatusResponse):
print(response)
sys.exit(-1)
print("The status of workflow {} is: {}".format(workflow_uuid, response.workflow_status))
Combining the initialization code with this code checking workflow status yields output similar to the following:
$ python get-fuzzball-workflow-status.py
The status of workflow f3854a71-cd36-444f-b91f-e95e27f03a87 is: STAGE_STATUS_FINISHED