You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/20 15:37:00 UTC

[GitHub] [airflow] uranusjr commented on pull request #18340: Adds run_after argument to the interval method in base Timetable.

uranusjr commented on pull request #18340:
URL: https://github.com/apache/airflow/pull/18340#issuecomment-923041330


   TBH I don’t see much benefit to this since you can easily do (as mentioned there’s an example at the end of the howto documentation for timetables)
   
   ```python
   DagRunInfo(
       data_interval=DataInterval(start, end),
       run_after=run_after,
   )
   ```
   
   The original purpose of interval is to cover the common `end == run_after` case, and for anything else I prefer constructing the `DagRunInfo` manually.
   
   If what you’re looking to avoid importing `DataInterval` (but why?) maybe we can have something like this?
   
   ```python
   DagRunInfo.create(
       data_interval=(start, end),
       run_after=run_after,
   )
   ```


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org