turbaszek commented on a change in pull request #13334:
URL: https://github.com/apache/airflow/pull/13334#discussion_r549266577



##########
File path: airflow/providers/google/cloud/hooks/tasks.py
##########
@@ -120,20 +122,19 @@ def create_queue(
         client = self.get_conn()
 
         if queue_name:
-            full_queue_name = CloudTasksClient.queue_path(project_id, 
location, queue_name)
+            full_queue_name = 
f"projects/{project_id}/locations/{location}/queues/{queue_name}"
             if isinstance(task_queue, Queue):
                 task_queue.name = full_queue_name
             elif isinstance(task_queue, dict):
                 task_queue['name'] = full_queue_name
             else:
                 raise AirflowException('Unable to set queue_name.')
-        full_location_path = CloudTasksClient.location_path(project_id, 
location)
+        full_location_path = f"projects/{project_id}/locations/{location}"
         return client.create_queue(
-            parent=full_location_path,
-            queue=task_queue,
+            request={'parent': full_location_path, 'queue': task_queue},
             retry=retry,
             timeout=timeout,
-            metadata=metadata,
+            metadata=metadata or (),

Review comment:
       Not a strong opinion, but I think doing this before function invocation 
may increase readability, WDYT?




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