You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/13 15:00:58 UTC
[GitHub] [airflow] ashb commented on a change in pull request #13651: BugFix: Dag-level Callback Requests were not run
ashb commented on a change in pull request #13651:
URL: https://github.com/apache/airflow/pull/13651#discussion_r556584232
##########
File path: airflow/models/dag.py
##########
@@ -348,6 +348,12 @@ def __init__(
self.partial = False
self.on_success_callback = on_success_callback
self.on_failure_callback = on_failure_callback
+
+ # To keep it in parity with Serialized DAGs
+ # and identify if DAG has on_*_callback without actually storing them in Serialized JSON
+ self.has_on_success_callback = bool(self.on_success_callback is not None)
+ self.has_on_failure_callback = bool(self.on_failure_callback is not None)
Review comment:
```suggestion
self.has_on_success_callback = self.on_success_callback is not None
self.has_on_failure_callback = self.on_failure_callback is not None
```
No need for bool I don't think
----------------------------------------------------------------
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:
users@infra.apache.org