amoghrajesh commented on code in PR #44907:
URL: https://github.com/apache/airflow/pull/44907#discussion_r1886756035


##########
task_sdk/src/airflow/sdk/api/client.py:
##########
@@ -134,6 +135,13 @@ def defer(self, id: uuid.UUID, msg):
         # Create a deferred state payload from msg
         self.client.patch(f"task-instances/{id}/state", 
content=body.model_dump_json())
 
+    def reschedule(self, id: uuid.UUID, msg):
+        """Tell the API server that this TI has been reschduled."""
+        body = TIRescheduleStatePayload(**msg.model_dump(exclude_unset=True))

Review Comment:
   Its of `RescheduleTask` class. The reason we just passed it down to this api 
endpoint is so that we do not need to worry about unpacking the object in the 
`handle_requests`. 
   ```
           elif isinstance(msg, RescheduleTask):
               self._terminal_state = IntermediateTIState.UP_FOR_RESCHEDULE
               self.client.task_instances.reschedule(self.id, msg)
               resp = None
   ```
   
   But a type can be added for sure. Let me do that



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