def process_record()

in amazon_polly_async_batch/responseprocessor.py [0:0]


def process_record(record):
    """
    Given the response from Polly for a specific synthesize request, updates the DynamoDb records with the results

    :param record: a record as sent by Polly
    """
    message = record['Sns']['Message']
    contents = json.loads(message)
    task_id = contents['taskId']
    status = contents['taskStatus']
    if status == 'COMPLETED':
        process_completed_task(task_id, contents['outputUri'])
    else:
        process_failed_task(task_id, status)
    logger.debug('Task {} ended with status {}'.format(task_id, status))