mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	ruff: Fix SIM113 Use enumerate() for index variable in for loop.
				
					
				
			Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							f165ba0fb3
						
					
				
				
					commit
					53e80c41ea
				
			@@ -634,12 +634,10 @@ def run_parallel_wrapper(
 | 
			
		||||
    logging.info("Distributing %s items across %s threads", len(full_items), threads)
 | 
			
		||||
 | 
			
		||||
    with ProcessPoolExecutor(max_workers=threads) as executor:
 | 
			
		||||
        count = 0
 | 
			
		||||
        for future in as_completed(
 | 
			
		||||
            executor.submit(wrapping_function, f, item) for item in full_items
 | 
			
		||||
        for count, future in enumerate(
 | 
			
		||||
            as_completed(executor.submit(wrapping_function, f, item) for item in full_items), 1
 | 
			
		||||
        ):
 | 
			
		||||
            future.result()
 | 
			
		||||
            count += 1
 | 
			
		||||
            if count % 1000 == 0:
 | 
			
		||||
                logging.info("Finished %s items", count)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user