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/11/29 10:59:11 UTC

[GitHub] [airflow] uranusjr commented on issue #19869: Custom Timetable Import Error

uranusjr commented on issue #19869:
URL: https://github.com/apache/airflow/issues/19869#issuecomment-981524121


   `__eq__` is for _instance_ equality, but the line you referenced compares the _type_ itself (i.e. the timetable class). The Python interpreter guarantees class identity, as far as I know, so the line is correct.
   
   A possible cause to this is your `workday` module has different identities in the DAG and in the plugin. Airflow adds the plugin directory on-load, and DAG files lazily when they are parsed, so if you put the timetable module in the DAG directory, it will be reloaded each time DAGs are parsed and have different identities. This is one of the reasons the example tells you to put the timetable class in the plugin’s module—identities of modules in this directory are stable (during an interpreter session).


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