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 2019/11/18 10:13:25 UTC
[GitHub] [airflow] ashb commented on a change in pull request #6594:
[AIRFLOW-6001][depends on AIRFLOW-6000] Lazy load CLI commands
ashb commented on a change in pull request #6594: [AIRFLOW-6001][depends on AIRFLOW-6000] Lazy load CLI commands
URL: https://github.com/apache/airflow/pull/6594#discussion_r347290868
##########
File path: airflow/__init__.py
##########
@@ -37,7 +37,8 @@
from airflow.configuration import conf
from airflow.exceptions import AirflowException
from airflow.models import DAG
-
+# Load SQLAlchemy models during package initialization
+from airflow import jobs # noqa: F401
Review comment:
This looks _really_ odd (cos this is `airflow`) - `import airflow.jobs` would be less stange looking.
Rather than putting this here though I think it makes a bit more sense to put it in airflow.models
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services