ashb commented on pull request #14792: URL: https://github.com/apache/airflow/pull/14792#issuecomment-799800650
> (the questions below are mostly queries not comments :) ) > > I am just trying to understand the `__del__` method here. When will it be called? Only during gc or when killing the process? It's called whenever python detects the object is unreachable. Python has a "hybrid" approach to garbage collection. Primarily it uses reference counting, so (assuming there is no loop in objects) the __del__ will be called as soon as the SchedulerJob goes out of scope (or when the variable is re-assigned in tests). > > and since we aren't ending the `self.executor` in `__del__`, how does this PR replace #14085 "If you add executor to the __del__, then yes" ---------------------------------------------------------------- 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]
