Hi team, Suppose I have a flyte workflow A, I wou...
# ask-the-community
v
Hi team, Suppose I have a flyte workflow A, I would like to get the “running” instances of this workflow from our cluster. For example, there are 5 instances of this workflow currently running in production. Is there a Flytekit API to retrieve all running exec id of workflow A? Thanks in advance 🙏
s
You can try the following (https://github.com/flyteorg/flytekit/blob/6d78c566bf27a273a392c4ef8f5daff781e90d32/flytekit/clients/friendly.py#L251):
Copy code
from flytekit.models.common import NamedEntityIdentifier

remote = FlyteRemote(...)

workflows, txt = remote.client.list_workflows_paginated(limit=10, identifier=NamedEntityIdentifier(project="", domain="", name="your-workflow-name"))
You can then loop over the
workflows
list and fetch the ids using
wf.id
.
v
Interesting thank you 🙏
152 Views