我刚到Airflow
岁.我遵循一个教程,并编写了以下代码.
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from datetime import datetime, timedelta
from models.correctness_prediction import CorrectnessPrediction
default_args = {
'owner': 'abc',
'depends_on_past': False,
'start_date': datetime.now(),
'email': ['abc@xyz.com'],
'email_on_failure': False,
'email_on_retry': False,
'retries': 1,
'retry_delay': timedelta(minutes=5)
}
def correctness_prediction(arg):
CorrectnessPrediction.train()
dag = DAG('daily_processing', default_args=default_args)
task_1 = PythonOperator(
task_id='print_the_context',
provide_context=True,
python_callable=correctness_prediction,
dag=dag)
On running the script, it doesn't show any errors but when I check for dags
in Web-UI
it doesn't show under Menu->DAGs
But I can see the scheduled job
under Menu->Browse->Jobs
我在$U HOME/dags中也看不到任何东西.难道只有这样吗?有人能解释为什么吗?