uranusjr commented on a change in pull request #15821:
URL: https://github.com/apache/airflow/pull/15821#discussion_r631903128



##########
File path: airflow/utils/callback_requests.py
##########
@@ -41,8 +54,12 @@ def __eq__(self, other):
     def __repr__(self):
         return str(self.__dict__)
 
+    def execute(self, dagbag: "DagBag", *, session: Session) -> None:
+        """Execute the callback."""
+        raise NotImplementedError("implement in subclass")
+
 
-class TaskCallbackRequest(CallbackRequest):
+class TaskCallbackRequest(CallbackRequest, LoggingMixin):

Review comment:
       Alternatively I can pass in the logger instance as an argument of 
`execute()` instead? I don’t really like making CallbackRequest instances 
subclass from `LoggingMixin` tbh, but passing a logger around also feels a bit 
weird.




-- 
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