Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29758

Airflow get stacked in last task of DAG after several executions

$
0
0

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


Viewing all articles
Browse latest Browse all 29758

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>