11import os .path
22import logging
3+ import time
34from multiprocessing import cpu_count , set_start_method
45from multiprocessing .pool import Pool
56from typing import Dict , Iterable , List , Optional , Tuple , Set
@@ -247,7 +248,13 @@ def get_docs(file_id: FileId) -> Optional[Tuple[int, str, LinesListDict]]:
247248 family = getFileFamily (filename )
248249 if family in (None , 'M' ): return
249250
251+ start = time .time ()
250252 lines = (line .decode () for line in scriptLines ('parse-docs' , hash , filename ))
253+ parser_time = time .time ()- start
254+
255+ if parser_time > 10 :
256+ print ("docs timeout" , parser_time , file_id )
257+
251258 docs = collect_get_blob_output (lines )
252259
253260 return (idx , family , docs )
@@ -259,7 +266,14 @@ def get_comps(file_id: FileId) -> Optional[Tuple[int, str, LinesListDict]]:
259266 if family in (None , 'K' , 'M' ): return
260267
261268 compatibles_parser = FindCompatibleDTS ()
269+
270+ start = time .time ()
262271 lines = compatibles_parser .run (scriptLines ('get-blob' , hash ), family )
272+ parser_time = time .time ()- start
273+
274+ if parser_time > 10 :
275+ print ("comps docs timeout" , parser_time , file_id )
276+
263277 comps = collect_get_blob_output (lines )
264278
265279 return (idx , family , comps )
@@ -293,9 +307,9 @@ def update_version(db: DB, tag: bytes, pool: Pool, dts_comp_support: bool):
293307
294308 logger .info ("collecting blobs done" )
295309
296- for result in pool .imap_unordered (get_defs , idxes , chunksize ):
297- if result is not None :
298- add_defs (db , result )
310+ # for result in pool.imap_unordered(get_defs, idxes, chunksize):
311+ # if result is not None:
312+ # add_defs(db, result)
299313
300314 logger .info ("defs done" )
301315
@@ -340,6 +354,9 @@ def update_version(db: DB, tag: bytes, pool: Pool, dts_comp_support: bool):
340354 set_start_method ('spawn' )
341355 with Pool () as pool :
342356 for tag in scriptLines ('list-tags' ):
357+ if not tag .startswith (b'v6.1' ) or b'rc' in tag :
358+ continue
359+
343360 if not db .vers .exists (tag ):
344361 logger .info ("updating tag %s" , tag )
345362 update_version (db , tag , pool , dts_comp_support )
0 commit comments