I'm having a problem with checking the status for all my Transcription job before start another step. I need to know when all jobs in myList
are COMPLTETED
or FAILED
, if it is false retry again 5 seconds later, but currently it keeps forever running, there is my python script:
while True:
final_list = []
for job in myList:
status = transcribe.get_transcription_job(TranscriptionJobName=job)
final_list.append(status.get('TranscriptionJob').get('TranscriptionJobStatus'))
if all(status in final_list for status in ['COMPLETED', 'FAILED']):
break
time.sleep(5)
Edit 1
Possible response status can be QUEUED
, IN_PROGRESS
, FAILED
, COMPLETED
Edit 2 Omar was right I'm not extracting corretly the status of each job response but script still running forever.