ashb commented on code in PR #54212: URL: https://github.com/apache/airflow/pull/54212#discussion_r2259700126
########## airflow-core/src/airflow/models/dagbag.py: ########## @@ -117,6 +119,33 @@ class FileLoadStat(NamedTuple): warning_num: int +class _TimeoutPosix(_timeout, LoggingMixin): Review Comment: I wonder if this should just be ```suggestion @contextlib.contextmanger def timeout(seconds=1, error_message="Timeout"): log = ... error_message = error_message + ", PID: " + str(os.getpid()) try: try: signal.signal(signal.SIGALRM, self.handle_timeout) signal.setitimer(signal.ITIMER_REAL, self.seconds) except ValueError: log.warning("timeout can't be used in the current context", exc_info=True) yield finally: with contextlib.supress(ValueError): signal.setitimer(signal.ITIMER_REAL, 0) ``` -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org