Weiwei Zhang
Weiwei Zhang

Reputation: 1

How can I find the status of an workflow execution?

For my current project, after I trigger a workflow, I need to check the status of its execution. I am not sure about the exact command. I have tried 'get-workflow' but it didn't seem to work.

Upvotes: 0

Views: 507

Answers (1)

kaylindris
kaylindris

Reputation: 88

There are a few ways, increasing in order of heavy-handedness.

  1. You can hit with curl or something the API endpoint directly in Admin.
  2. The Python SDK (flytekit) also ships with a command-line control plane utility called flyte-cli. In the future this may move to another location but it's here for now and you can hit it with this command.
flyte-cli -p yourproject -d development get-execution -u ex:yourproject:development:2fd90i
  1. You can also use the Python class in flytekit that represents a workflow execution.
In [1]: from flytekit.configuration import set_flyte_config_file

In [2]: set_flyte_config_file('/Users/user/.flyte/config')

In [3]: from flytekit.common.workflow_execution import SdkWorkflowExecution

In [4]: e = SdkWorkflowExecution.fetch('yourproject', 'development', '2fd90i')

Upvotes: 0

Related Questions