<@ULVA73B9P> How to find the running Task via CL...
# marvin-in-the-wild
p
@Marvin How to find the running Task via CLI and try to stop the task via CLI ?
m
It seems that direct guidance on finding and stopping a running task via the CLI isn't well-documented or straightforwardly referenced in the available documentation. However, here are steps that should help guide you through the process of managing task runs: 1. Find a Running Task via CLI: - Use the CLI command to list all task runs and filter by their status. You can accomplish this using:
Copy code
prefect task-run ls --state Running
2. Stop a Running Task via CLI: - Use the CLI command to cancel a running task:
Copy code
prefect task-run cancel <task_run_id>
- If the above commands don't directly provide the solution, you might need to look into stopping tasks via related infrastructure (e.g., ECS for AWS). Refer to the ECS documentation: ECS Agent Configuration. For more specific use-case examples or additional help, you can refer to Prefect's GitHub issues, such as: - Cannot stop ECS task: the cluster could not be found - Docker agent tasks stuck in submitted state For further assistance, you can explore Prefect's Tasks Documentation or refer to the documentation on integrations with AWS ECS. Let me know if you need anything else.