[AIRFLOW-1984] Fix to AWS Batch operator
Correct key is "container" rather than "attempts": https://docs.aws.amazon.com/batch/latest/APIRefere nce/API_DescribeJobs.html Closes #2927 from richardpenman/master
This commit is contained in:
Родитель
f6a1c3cf7f
Коммит
59e3598190
|
@ -143,7 +143,8 @@ class AWSBatchOperator(BaseOperator):
|
|||
if 'attempts' in job:
|
||||
containers = job['attempts']
|
||||
for container in containers:
|
||||
if job['status'] == 'FAILED' or container['attempts']['exitCode'] != 0:
|
||||
if (job['status'] == 'FAILED' or
|
||||
container['container']['exitCode'] != 0):
|
||||
print("@@@@")
|
||||
raise AirflowException('This containers encounter an error during execution {}'.format(job))
|
||||
elif job['status'] is not 'SUCCEEDED':
|
||||
|
|
Загрузка…
Ссылка в новой задаче