Dears, I am new to AWS and I am looking for function/code to check users' asynchronous status tasks from AWS comprehend. I am checking boto3 docs - https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/comprehend.html#client but not able to find my answer. can you please guide me thanks
Asked
Active
Viewed 59 times
0
-
class ComprehendDetect: def __init__(self, comprehend_client): self.comprehend_client = comprehend_client def detect_languages(self, job): try: response = self.comprehend_client.client.list_entities_detection_jobs(JobStatus=job) status = response['JobStatus'] logger.info("Detected %s status.") except ClientError: logger.exception("Job in progress.") raise else: return status – be1ym264 Aug 15 '22 at 08:46
-
does this work ? please advise – be1ym264 Aug 15 '22 at 08:49
1 Answers
0
To check the async job status for Amazon Comprehend, you can use describe job API. For instance, describe_dominant_language_detection_job()
, the response will include the Job Status information:
'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'FAILED'.

Mia Chang
- 121
- 2