razius opened a new issue #11123:
URL: https://github.com/apache/airflow/issues/11123


   From the scheduler logs:
   
   ```
   Traceback (most recent call last):
     File "/opt/airflow/airflow/jobs/scheduler_job.py", line 1606, in _execute
       self.adopt_or_reset_orphaned_tasks()
     File "/opt/airflow/airflow/utils/session.py", line 65, in wrapper
       return func(*args, **kwargs)
     File "/opt/airflow/airflow/jobs/scheduler_job.py", line 1810, in 
adopt_or_reset_orphaned_tasks
       to_reset = self.executor.try_adopt_task_instances(tis_to_reset_or_adopt)
     File "/opt/airflow/airflow/executors/celery_executor.py", line 376, in 
try_adopt_task_instances
       self.adopted_task_timeouts[ti.key] = ti.queued_dttm + 
self.task_adoption_timeout
   TypeError: unsupported operand type(s) for +: 'NoneType' and 
'datetime.timedelta'
   [2020-09-24 12:13:16,137] {dag_processing.py:521} WARNING - Ending without 
manager process.
   [2020-09-24 12:13:16,138] {scheduler_job.py:1637} INFO - Exited execute loop
   ```
   
   Looks like a problem introduced by 59dad1a4ea6f3ba39d7be8c46ee45ea7cb0dd1f9, 
I assumed it's a problem with data created before that commit and a missing 
migration so I did the following for fix it:
   
   ```
   airflow=> DELETE FROM task_instance WHERE queued_dttm IS NULL and state = 
'scheduled';
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to