Lee-W commented on code in PR #59604:
URL: https://github.com/apache/airflow/pull/59604#discussion_r2667343390


##########
airflow-core/src/airflow/config_templates/config.yml:
##########
@@ -1696,6 +1696,33 @@ workers:
       type: float
       example: ~
       default: "60.0"
+    startup_dagbag_reschedule_max_attempts:

Review Comment:
   just updated



##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -1648,7 +1678,17 @@ def main():
     SUPERVISOR_COMMS = CommsDecoder[ToTask, ToSupervisor](log=log)
 
     try:
-        ti, context, log = startup()
+        try:
+            ti, context, log = startup()
+        except AirflowRescheduleException as reschedule:
+            log.info("Rescheduling task during startup, marking task as 
UP_FOR_RESCHEDULE")
+            SUPERVISOR_COMMS.send(
+                msg=RescheduleTask(
+                    reschedule_date=reschedule.reschedule_date,
+                    end_date=datetime.now(tz=timezone.utc),
+                )
+            )
+            exit(0)

Review Comment:
   yep, if we change it here, should we also change the ones below?
   
   
https://github.com/apache/airflow/pull/59604/changes#diff-5bef10ab2956abf7360dbf9b509b6e1113407874d24abcc1b276475051f13abfR1701



-- 
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]

Reply via email to