@@ -149,11 +149,21 @@ def parallel_compute_commit_timestamps(self, files, original_source: Optional[Di
149149 pool = multiprocessing .Pool (processes = min (10 , multiprocessing .cpu_count ()))
150150 results = []
151151 for f in files :
152- if f .is_documentation_page ():
152+ print (f .abs_src_path )
153+ if not f .is_documentation_page ():
154+ continue
155+ elif getattr (f , "generated_by" , None ):
156+ continue
157+ elif f .abs_src_path is None :
158+ continue
159+ elif exclude (f .src_path , self .config .get ("exclude" , [])):
160+ continue
161+ else :
153162 abs_src_path = f .abs_src_path
154- # Support plugins like monorep that might have moved the files from the original source that is under git
163+ # Support plugins like monorepo that might have moved the files from the original source that is under git
155164 if original_source and abs_src_path in original_source :
156165 abs_src_path = original_source [abs_src_path ]
166+
157167 assert Path (abs_src_path ).exists ()
158168 abs_src_path = str (Path (abs_src_path ).absolute ())
159169 result = pool .apply_async (self .util .get_git_commit_timestamp , args = (abs_src_path , is_first_commit ))
@@ -182,11 +192,12 @@ def on_files(self, files: Files, config: MkDocsConfig):
182192
183193 try :
184194 if not self .last_revision_commits :
185- self .parallel_compute_commit_timestamps (files = files , original_source = original_source , is_first_commit = False )
195+ self .parallel_compute_commit_timestamps (files = files , original_source = original_source , is_first_commit = False )
186196 if not self .created_commits :
187197 self .parallel_compute_commit_timestamps (files = files , original_source = original_source , is_first_commit = True )
188198 except Exception as e :
189199 logging .warning (f"Parallel processing failed: { str (e )} .\n To fall back to serial processing, use 'enable_parallel_processing: False' setting." )
200+ raise e
190201
191202
192203 def on_page_markdown (self , markdown : str , page : Page , config : config_options .Config , files , ** kwargs ) -> str :
0 commit comments