libkas: Rework repo_fetch to parallelized repos_fetch
Building on top of run_cmd_async, this reworks repo_fetch to a repository list fetcher repos_fetch that runs those operations in parallel. The two users, ReposFetch and ConfigStatic, are converted to exploit this parallelization. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
		
				
					committed by
					
						
						Daniel Wagner
					
				
			
			
				
	
			
			
			
						parent
						
							19ee6edcb1
						
					
				
				
					commit
					0bdd7a8d52
				
			@@ -43,7 +43,7 @@ except ImportError:
 | 
			
		||||
        return platform.dist()[0]
 | 
			
		||||
 | 
			
		||||
from .repos import Repo
 | 
			
		||||
from .libkas import run_cmd, repo_fetch, repo_checkout
 | 
			
		||||
from .libkas import run_cmd, repos_fetch, repo_checkout
 | 
			
		||||
 | 
			
		||||
__license__ = 'MIT'
 | 
			
		||||
__copyright__ = 'Copyright (c) Siemens AG, 2017'
 | 
			
		||||
@@ -331,8 +331,9 @@ class ConfigStatic(Config):
 | 
			
		||||
            missing_repos = [repo_dict[repo_name]
 | 
			
		||||
                             for repo_name in missing_repo_names]
 | 
			
		||||
 | 
			
		||||
            repos_fetch(self, missing_repos)
 | 
			
		||||
 | 
			
		||||
            for repo in missing_repos:
 | 
			
		||||
                repo_fetch(self, repo)
 | 
			
		||||
                repo_checkout(self, repo)
 | 
			
		||||
 | 
			
		||||
            repo_paths = {r: repo_dict[r].path for r in repo_dict}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user