ashb commented on code in PR #59604:
URL: https://github.com/apache/airflow/pull/59604#discussion_r2671778901
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -669,6 +670,33 @@ def _xcom_push_to_db(ti: RuntimeTaskInstance, key: str,
value: Any) -> None:
)
+def _maybe_reschedule_startup_failure(
+ *,
+ ti_context: TIRunContext,
+ log: Logger,
+) -> None:
+ """
+ Attempt to reschedule the task when a startup failure occurs.
+
+ This does not count as a retry. If the reschedule limit is exceeded, this
function
+ returns and the caller should fail the task.
+ """
+ max_reschedules = conf.getint("workers", "task_startup_timeout_retries",
fallback=3)
+ reschedule_delay = conf.getint("workers", "task_startup_timeout",
fallback=60)
+
+ reschedule_count = int(getattr(ti_context, "task_reschedule_count", 0) or
0)
Review Comment:
Where do we store or track this count?
--
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]