ramitkataria commented on code in PR #55241:
URL: https://github.com/apache/airflow/pull/55241#discussion_r2323729520


##########
airflow-core/src/airflow/triggers/deadline.py:
##########
@@ -49,26 +49,25 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
         from airflow.models.deadline import DeadlineCallbackState  # to avoid 
cyclic imports
 
         try:
-            callback = import_string(self.callback_path)
             yield TriggerEvent({PAYLOAD_STATUS_KEY: 
DeadlineCallbackState.RUNNING})
+            callback = import_string(self.callback_path)
 
-            # TODO: get airflow context
-            context: dict = {}
-
-            result = await callback(**self.callback_kwargs, context=context)
-            log.info("Deadline callback completed with return value: %s", 
result)

Review Comment:
   The triggerer already emits an info log when the TriggerEvent is yielded so 
we don't need an extra log here



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

Reply via email to