qwe-kev commented on code in PR #59657:
URL: https://github.com/apache/airflow/pull/59657#discussion_r2638771143
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -753,6 +754,12 @@ def startup() -> tuple[RuntimeTaskInstance, Context,
Logger]:
ti = parse(msg, log)
log.debug("Dag file parsed", file=msg.dag_rel_path)
+ # Send execution timeout to supervisor if configured
+ if hasattr(ti.task, "execution_timeout") and ti.task.execution_timeout:
Review Comment:
Hi, since all real tasks inherit from "BaseOperator" and have
"execution_timeout". I've verified the same in the test suite. The "hasattr"
check is unnecessary. I'll simplify it to:
timeout = ti.task.execution_timeout
if isinstance(timeout, timedelta):
# Send execution timeout to supervisor
--
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]