check_fargate_task#
- RETRIES_EXCEEDED_EXIT_CODE = 80#
Exit code used when task run retries exceed the maximum retries.
- check_fargate_task(cluster: str, task_arn: str, max_retries: int) int | State [source]#
Check for exit code of an AWS Fargate task.
If this task is running within a Prefect flow, it will use the task run context to get the current run count. While the run count is below the maximum number of retries, the task will continue to attempt to get the exit code, and can be called with a retry delay to periodically check the status of jobs.
If this task is not running within a Prefect flow, the
max_retries
parameters is ignored. Tasks that are still running will throw an exception.- Parameters:
cluster – ECS cluster name.
task_arn (str) – Task ARN.
max_retries – Maximum number of retries.
- Returns:
Exit code if the job is complete, otherwise throws an exception.