airflow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajasimmangandhi@gmail.com <rajasimmangan...@gmail.com>
Subject Airflow Kill Halted Tasks Error
Date Thu, 21 Mar 2019 00:59:10 GMT
Hi Everyone,
I've downloaded the source code from Github. The below link is
https://github.com/teamclairvoyant/airflow-maintenance-dags/tree/master/kill-halted-tasks

Apparently it throws an error related to Datetime. I have tried changing the code but nothing
works. Is this issue already been resolved?

File "/home/airflow/Desktop/BI-Team/py/lib/python3.6/site-packages/airflow/models.py", line
1657, in _run_raw_task
    result = task_copy.execute(context=context)
  File "/home/airflow/Desktop/BI-Team/py/lib/python3.6/site-packages/airflow/operators/python_operator.py",
line 103, in execute
    return_value = self.execute_callable()
  File "/home/airflow/Desktop/BI-Team/py/lib/python3.6/site-packages/airflow/operators/python_operator.py",
line 108, in execute_callable
    return self.python_callable(*self.op_args, **self.op_kwargs)
  File "/home/airflow/Desktop/BI-Team/airflow/dags/airflow-kill-halted-tasks.py", line 131,
in kill_halted_tasks_function
    execution_date_to_search_for = datetime.strptime((process["airflow_execution_date"]).replace("T",
" "), '%Y-%m-%d %H:%M:%S.%f')
  File "/usr/lib/python3.6/_strptime.py", line 565, in _strptime_datetime
    tt, fraction = _strptime(data_string, format)
  File "/usr/lib/python3.6/_strptime.py", line 362, in _strptime
    (data_string, format))
ValueError: time data '2019-03-20 22:37:34' does not match format '%Y-%m-%d %H:%M:%S.%f'
[2019-03-21 10:53:12,494] {models.py:1811} INFO - Marking task as UP_FOR_RETRY

Thanks,
Raj

Mime
View raw message