@@ -149,11 +149,21 @@ def parallel_compute_commit_timestamps(self, files, original_source: Optional[Di
149
149
pool = multiprocessing .Pool (processes = min (10 , multiprocessing .cpu_count ()))
150
150
results = []
151
151
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 :
153
162
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
155
164
if original_source and abs_src_path in original_source :
156
165
abs_src_path = original_source [abs_src_path ]
166
+
157
167
assert Path (abs_src_path ).exists ()
158
168
abs_src_path = str (Path (abs_src_path ).absolute ())
159
169
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):
182
192
183
193
try :
184
194
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 )
186
196
if not self .created_commits :
187
197
self .parallel_compute_commit_timestamps (files = files , original_source = original_source , is_first_commit = True )
188
198
except Exception as e :
189
199
logging .warning (f"Parallel processing failed: { str (e )} .\n To fall back to serial processing, use 'enable_parallel_processing: False' setting." )
200
+ raise e
190
201
191
202
192
203
def on_page_markdown (self , markdown : str , page : Page , config : config_options .Config , files , ** kwargs ) -> str :
0 commit comments