dstandish commented on code in PR #39189:
URL: https://github.com/apache/airflow/pull/39189#discussion_r1576274498
##########
airflow/sensors/base.py:
##########
@@ -82,6 +88,29 @@ def __bool__(self) -> bool:
return self.is_done
+@internal_api_call
+@provide_session
+def _orig_start_date(dag_id, task_id, run_id, map_index, try_number, session:
Session = NEW_SESSION):
+ """
+ Get the original start_date for a rescheduled task.
+
+ :meta private:
+ """
+ return session.scalar(
+ select(TaskReschedule)
+ .where(
+ TaskReschedule.dag_id == dag_id,
+ TaskReschedule.task_id == task_id,
+ TaskReschedule.run_id == run_id,
+ TaskReschedule.map_index == map_index,
+ TaskReschedule.try_number == try_number,
+ )
+ .order_by(asc(TaskReschedule.id))
Review Comment:
updated
##########
airflow/sensors/base.py:
##########
@@ -82,6 +88,29 @@ def __bool__(self) -> bool:
return self.is_done
+@internal_api_call
+@provide_session
+def _orig_start_date(dag_id, task_id, run_id, map_index, try_number, session:
Session = NEW_SESSION):
Review Comment:
done
--
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]