vincbeck commented on code in PR #28900:
URL: https://github.com/apache/airflow/pull/28900#discussion_r1323594607


##########
airflow/models/taskinstance.py:
##########
@@ -1583,14 +2334,22 @@ def _run_raw_task(
 
             # Recording SKIPPED or SUCCESS
             self.clear_next_method_args()
-            self.end_date = timezone.utcnow()
-            self._log_state()
-            self.set_duration()
+            _log_state(task_instance=self)
+            TaskInstance.set_end_date(
+                dag_id=self.dag_id,
+                run_id=self.run_id,
+                task_id=self.task_id,
+                map_index=self.map_index,
+                end_date=timezone.utcnow(),
+                session=session,
+            )
+
+            self.refresh_from_db(session=session)

Review Comment:
   I am good with that option :D. Let me revert that then



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