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/04/29 20:31:05 UTC

[GitHub] [airflow] BasPH commented on a change in pull request #5200: [AIRFLOW-4401] Use managers for Queue synchronization

BasPH commented on a change in pull request #5200: [AIRFLOW-4401] Use managers for Queue synchronization
URL: https://github.com/apache/airflow/pull/5200#discussion_r279520392
 
 

 ##########
 File path: airflow/contrib/executors/kubernetes_executor.py
 ##########
 @@ -734,15 +741,17 @@ def sync(self):
 
         KubeResourceVersion.checkpoint_resource_version(last_resource_version)
 
-        for i in range(min((self.kube_config.worker_pods_creation_batch_size, self.task_queue.qsize()))):
-            task = self.task_queue.get()
-
+        for i in range(self.kube_config.worker_pods_creation_batch_size):
 
 Review comment:
   Although the `for i in` was already in there, we don't use the `i` so no need to assign it:
   
   ```suggestion
           for _ in range(self.kube_config.worker_pods_creation_batch_size):
   ```

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