title: DAG does not recognize tasks Airflow
body: <p>I have a file that defines the DAG object:</p>
  
  <p><strong>dags/my_dag.py</strong></p>
  
  <pre><code>from airflow import DAG
  from datetime import datetime
  
  default_args = {
      'owner': 'pilota',
      'depends_on_past': False,
      'start_date': datetime(2019, 10, 1),
      'email': ['some@email.com'],
      'email_on_failure': True,
      'email_on_retry': False,
      'retries': 0,
  }
  
  bts_dag = DAG(
      'hist_data_etl', default_args=default_args, schedule_interval='@once')
  </code></pre>
  
  <p>Then in another file, I import the created dag and define my tasks:</p>
  
  <pre><code>from ingestion.airflow_home.dags.my_dag import bts_dag
  from airflow.operators.bash_operator import BashOperator
  from airflow.operators.python_operator import PythonOperator
  from ingestion.datatransformer import fetch_and_transform_bts_data_col
  
  NUM_ENGINES = 4
  
  template_command = '''
      ipcluster start n {{ params.cluster }}
      sleep 5
  '''
  
  start_iparallel_cluster = BashOperator(
      task_id='start_cluster',
      bash_command=template_command,
      retries=3,
      params={'params': NUM_ENGINES},
      dag=bts_dag)
  
  
  import_hist_bts_data_task = PythonOperator(
      task_id='fetch_transform_hist_col',
      python_callable=fetch_and_transform_bts_data_col,
      op_kwargs={
          'bucket': 'some-bucket', 'path': 'hello/', 'num_files': 1
      },
      dag=bts_dag)
  
  start_iparallel_cluster &gt;&gt; import_hist_bts_data_task
  </code></pre>
  
  <p>sanity check:</p>
  
  <p><code>$ airflow list_dags</code></p>
  
  <p>yields:</p>
  
  <pre><code> -------------------------------------------------------------------
  DAGS
  -------------------------------------------------------------------
  hist_data_etl
  </code></pre>
  
  <p><strong>however</strong></p>
  
  <p><code>$ airflow list_tasks hist_data_etl</code></p>
  
  <p>doesn't output any of my tasks. Somehow airflow isn't registering the tasks to belong to the DAG I defined in another file.</p>
  
  <p>Please help :)</p>