mirror of
https://github.com/hwchase17/langchain
synced 2024-11-20 03:25:56 +00:00
community[patch]: remove print (#17435)
This commit is contained in:
parent
54fa78c887
commit
f7e453971d
@ -82,14 +82,12 @@ class AthenaLoader(BaseLoader):
|
|||||||
ResultConfiguration={"OutputLocation": self.s3_output_uri},
|
ResultConfiguration={"OutputLocation": self.s3_output_uri},
|
||||||
)
|
)
|
||||||
query_execution_id = response["QueryExecutionId"]
|
query_execution_id = response["QueryExecutionId"]
|
||||||
print(f"Query : {self.query}")
|
|
||||||
while True:
|
while True:
|
||||||
response = self.athena_client.get_query_execution(
|
response = self.athena_client.get_query_execution(
|
||||||
QueryExecutionId=query_execution_id
|
QueryExecutionId=query_execution_id
|
||||||
)
|
)
|
||||||
state = response["QueryExecution"]["Status"]["State"]
|
state = response["QueryExecution"]["Status"]["State"]
|
||||||
if state == "SUCCEEDED":
|
if state == "SUCCEEDED":
|
||||||
print(f"State : {state}")
|
|
||||||
break
|
break
|
||||||
elif state == "FAILED":
|
elif state == "FAILED":
|
||||||
resp_status = response["QueryExecution"]["Status"]
|
resp_status = response["QueryExecution"]["Status"]
|
||||||
@ -98,8 +96,6 @@ class AthenaLoader(BaseLoader):
|
|||||||
raise Exception(err)
|
raise Exception(err)
|
||||||
elif state == "CANCELLED":
|
elif state == "CANCELLED":
|
||||||
raise Exception("Query was cancelled by the user.")
|
raise Exception("Query was cancelled by the user.")
|
||||||
else:
|
|
||||||
print(f"State : {state}")
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
result_set = self._get_result_set(query_execution_id)
|
result_set = self._get_result_set(query_execution_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user