dabla commented on code in PR #60651:
URL: https://github.com/apache/airflow/pull/60651#discussion_r2705897517


##########
providers/microsoft/winrm/src/airflow/providers/microsoft/winrm/operators/winrm.py:
##########
@@ -122,3 +180,28 @@ def execute(self, context: Context) -> list | str:
         stderr_output = b"".join(stderr_buffer).decode(self.output_encoding)
         error_msg = f"Error running cmd: {self.command}, return code: 
{return_code}, error: {stderr_output}"
         raise AirflowException(error_msg)
+
+    def execute_complete(
+        self,
+        context: Context,
+        event: dict[Any, Any] | None = None,
+    ) -> Any:
+        """
+        Execute callback when WinRMCommandOutputTrigger finishes execution.
+
+        This method gets executed automatically when WinRMCommandOutputTrigger 
completes its execution.
+        """
+        if event:
+            status = event.get("status")
+            return_code = event.get("return_code")
+
+            self.log.info("%s completed with %s", self.task_id, status)
+
+            stdout = base64.standard_b64decode(event.get("stdout", b""))

Review Comment:
   Thx @kaxil for the review and good catches, I've fixed all remarks.



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