You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "syedahsn (via GitHub)" <gi...@apache.org> on 2023/06/21 18:50:18 UTC
[GitHub] [airflow] syedahsn commented on a diff in pull request #32055: add async wait method to the "with logging" aws utils
syedahsn commented on code in PR #32055:
URL: https://github.com/apache/airflow/pull/32055#discussion_r1237443400
##########
airflow/providers/amazon/aws/utils/waiter_with_logging.py:
##########
@@ -68,23 +70,81 @@ def wait(
except WaiterError as error:
if "terminal failure" in str(error):
raise AirflowException(f"{failure_message}: {error}")
- status_string = _format_status_string(status_args, error.last_response)
- log.info("%s: %s", status_message, status_string)
+ log.info("%s: %s", status_message, _LazyStatusFormatter(status_args, error.last_response))
Review Comment:
Just so I'm understanding this correctly, the `__str__` of `_LazyStatusFormatter` will only be called if the log is actually being printed, which saves computation time right?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org