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 2022/07/27 06:40:08 UTC

[GitHub] [airflow] uranusjr commented on pull request #23662: Implement CronTriggerTimetable

uranusjr commented on PR #23662:
URL: https://github.com/apache/airflow/pull/23662#issuecomment-1196324285

   Implementation looks good, but the class inheritance is a bit too complicated now to me. Since CronTriggerTimetable doesn’t actually share a lot of logic with DeltaDataIntervalTimetable, it’s probably better to make them more separated. It should be possible to do inheritance like this instead:
   
   ```
                                                                    ┌─────────────┐
                                                                    │             │
                                                                    │  Timetable  │
                                                                    │             │
                                                                    └──▲───────▲──┘
                                                                       │       │
                             ┌─────────────────────────────────────────┘       │
                             │                                                 │
                  ┌──────────┴───────────┐         ┌─────────────┐             │
                  │                      │         │             │             │
                  │_DataIntervalTimetable│         │ _CronMixin  │             │
                  │                      │         │             │             │
                  └───▲───────────────▲──┘         └──▲──────▲───┘             │
                      │               │               │      │                 │
                      │               │               │      └──────────┐      │
                      │               │               │                 │      │
   ┌──────────────────┴───────┐ ┌─────┴───────────────┴─────┐   ┌───────┴──────┴───────┐
   │                          │ │                           │   │                      │
   │DeltaDataIntervalTimetable│ │ CronDataIntervalTimetable │   │ CronTriggerTimetable │
   │                          │ │                           │   │                      │
   └──────────────────────────┘ └───────────────────────────┘   └──────────────────────┘
   ```


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