syedahsn commented on code in PR #25971:
URL: https://github.com/apache/airflow/pull/25971#discussion_r957511335
##########
airflow/providers/amazon/aws/hooks/athena.py:
##########
@@ -188,17 +189,35 @@ def get_query_results_paginator(
paginator = self.get_conn().get_paginator('get_query_results')
return paginator.paginate(**result_params)
- def poll_query_status(self, query_execution_id: str, max_tries:
Optional[int] = None) -> Optional[str]:
+ def poll_query_status(
+ self,
+ query_execution_id: str,
+ max_polling_attempts: Optional[int] = None,
+ max_tries: Optional[int] = None,
+ ) -> Optional[str]:
"""
Poll the status of submitted athena query until query state reaches
final state.
Returns one of the final states
:param query_execution_id: Id of submitted athena query
- :param max_tries: Number of times to poll for query state before
function exits
+ :param max_tries: Deprecated - Use max_polling_attempts instead
+ :param max_polling_attempts: Number of times to poll for query state
before function exits
:return: str
"""
+ if max_tries:
+ warnings.warn(
+ f"Method `{self.__class__.__name__}.max_tries` is deprecated
and will be removed "
+ "in a future release. Please use method
`max_polling_attempts` instead.",
Review Comment:
Missed that, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]