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 2019/09/21 10:44:08 UTC

[GitHub] [airflow] nuclearpinguin commented on a change in pull request #6096: [AIRFLOW-5477] Rewrite Google PubSub Hook to Google Cloud Python

nuclearpinguin commented on a change in pull request #6096: [AIRFLOW-5477] Rewrite Google PubSub Hook to Google Cloud Python
URL: https://github.com/apache/airflow/pull/6096#discussion_r326855817
 
 

 ##########
 File path: airflow/gcp/sensors/pubsub.py
 ##########
 @@ -98,11 +110,17 @@ def execute(self, context):
     def poke(self, context):
         hook = PubSubHook(gcp_conn_id=self.gcp_conn_id,
                           delegate_to=self.delegate_to)
-        self._messages = hook.pull(
-            self.project, self.subscription, self.max_messages,
-            self.return_immediately)
+        pulled_messages = hook.pull(
+            project_id=self.project_id,
+            subscription=self.subscription,
+            max_messages=self.max_messages,
+            return_immediately=self.return_immediately
+        )
+
+        self._messages = [MessageToDict(m) for m in pulled_messages]
+
         if self._messages and self.ack_messages:
             if self.ack_messages:
 
 Review comment:
   ```suggestion
   ```
   This is a double assertion. 

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


With regards,
Apache Git Services