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


##########
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:
   What is msg here? It should probably have a type, or if it's just the 
datetime pass that in directly and create the message type in this function 
(similar to how we do for `heartbeat` and `finish` methods. We should likely 
have done `defer` differently too. Maybe.)



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