Airflow get stacked in last task of DAG after several executions

吃可爱长大的小学妹 提交于 2020-01-16 08:59:40

问题


I have a DAG which is formed by 7 tasks. I have executed it many times but lately it is getting stuck in the last task, which is a very simple python operator as follow:

def send_email(warnings):
    warnings = ast.literal_eval(warnings)
    warnings_list = '\n'.join(warnings)

    email_message =f"""Good morning, the past week there were some performance issues, which were the following ones:

            \n {warnings_list}

            Have a nice day!"""

    send_email_smtp(to = 'email@email.com',
              subject = 'Warning',
              html_content = email_message)

send_email_task = PythonOperator(
            task_id = 'send_email_task',
            op_args = ["{{ task_instance.xcom_pull(task_ids='performance_comparison') }}"],
            python_callable = send_email)

If I enter in Task Instance Details I see the following: Task Instance State: Task is in the 'running' state which is not a valid state for execution. The task must be cleared in order to be run. Task Instance Not Already Running: Task is already running, it started on 2019-12-17 18:00:20.747617+00:00.

I have cleared the task and marked as failing/success several times. I have even modified a little the code of the DAG to force the refresh but it still not working. As I said, a few hours ago it has worked several times.

Would you know what is going on?

Thank you very much in advance

来源:https://stackoverflow.com/questions/59379807/airflow-get-stacked-in-last-task-of-dag-after-several-executions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!