You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `from_deployment` method is only available for argo-workflows at the moment.
111
112
:::
112
113
114
+
## Listing deployed flows
115
+
116
+
You can list all deployed flows using the `list_deployed_flows` class method. This is useful for discovering existing deployments, performing cleanup operations, etc.
117
+
118
+
```py
119
+
from metaflow import DeployedFlow
120
+
121
+
# List all deployed flows
122
+
for df in DeployedFlow.list_deployed_flows():
123
+
print(f"Found deployment: {df.name}")
124
+
```
125
+
126
+
You can also filter by flow name to find all deployments of a specific flow by passing in the `flow_name` parameter.
127
+
128
+
### Example: Cleaning up old deployments
129
+
130
+
A common use case is to clean up deployments that haven't been used recently. Here's an example that deletes templates that haven't run in the last 90 days:
131
+
132
+
```py
133
+
from datetime import datetime, timedelta
134
+
from metaflow import Flow, DeployedFlow, namespace
135
+
136
+
# Delete templates that haven't run in the last 90 days
0 commit comments