uranusjr commented on issue #25207:
URL: https://github.com/apache/airflow/issues/25207#issuecomment-1190913015
Instead of overriding the class, it seems like something like an _on-clear
hook_ would be more suitable? Say (illustrative only)
```python
def on_dag_clear(dag: DAG) -> None:
# Do something here...
dag = DAG(..., on_clear=on_dag_clear)
```
So the function is called when the DAG is cleared. We generally don’t want
to allow the user to override behaviour in DAG because it’s executed directly
in the Airflow process, and bad code can easily hang or even crash Airflow
entirely.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]