예제 #1
0
 def __poll_status(self, query_execution_id):
     status = self.get_query_status(query_execution_id)
     if status in ['SUCCEEDED', 'FAILED']:
         return status
     else:
         raise Exceptions.QueryExecutionTimeoutException(
             "Query to athena has timed out. Try running the query in the athena or asynchronously"
         )
예제 #2
0
    def __poll_status(self, query_execution_id):
        res = self.__athena.get_query_execution(
            QueryExecutionId=query_execution_id)
        status = res['QueryExecution']['Status']['State']

        if status == 'SUCCEEDED':
            return status
        elif status == 'FAILED':
            return status
        else:
            raise Exceptions.QueryExecutionTimeoutException(
                "Query to athena has timed out. Try running in query in the athena"
            )