File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,10 @@ def generate_sign(
4949 """
5050
5151 async def sign_file (
52- filename : str , failed_paths : List [str ], generated_signs : List [str ]
52+ filename : str , failed_paths : List [str ], generated_signs : List [str ],
53+ sem : asyncio .BoundedSemaphore
5354 ):
54- async with asyncio . BoundedSemaphore ( 10 ) :
55+ async with sem :
5556 signature_file = filename + ".asc"
5657 if prefix :
5758 remote = os .path .join (prefix , signature_file )
@@ -107,13 +108,14 @@ def __do_path_cut_and(
107108 failed_paths = []
108109 generated_signs = []
109110 tasks = []
111+ sem = asyncio .BoundedSemaphore (10 )
110112 for full_path in file_paths :
111113 path = full_path
112114 if path .startswith (slash_root ):
113115 path = path [len (slash_root ):]
114116 tasks .append (
115117 asyncio .ensure_future (
116- path_handler (path , failed_paths , generated_signs )
118+ path_handler (path , failed_paths , generated_signs , sem )
117119 )
118120 )
119121
You can’t perform that action at this time.
0 commit comments