https://flyte.org logo
#ask-the-community
Title
# ask-the-community
v

varsha Parthasarathy

12/11/2022, 3:51 AM
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

Samhita Alla

12/11/2022, 7:54 AM
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

varsha Parthasarathy

12/12/2022, 1:09 AM
Interesting thank you 🙏
65 Views