gopidesupavan commented on code in PR #42080:
URL: https://github.com/apache/airflow/pull/42080#discussion_r1754057621


##########
airflow/providers/google/cloud/triggers/pubsub.py:
##########
@@ -106,7 +106,10 @@ async def run(self) -> AsyncIterator[TriggerEvent]:  # 
type: ignore[override]
                 ):
                     if self.ack_messages:
                         await self.message_acknowledgement(pulled_messages)
-                    yield TriggerEvent({"status": "success", "message": 
pulled_messages})
+
+                    messages_json = [ReceivedMessage.to_dict(m) for m in 
pulled_messages]

Review Comment:
   Another option i would think, but this add extra conversion,
   
   convert to json string format(in trigger)-->and in execute_complete convert 
back to ReceiveMessage format(it is original pubsub response structure)---> and 
use user provided message_callback?, with this way we can support 
messages_callback in both modes.  



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