Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3aa7fe4

Browse files
committed
UTIL: add utility to redirect everything
1 parent 7a1c948 commit 3aa7fe4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

_websiteutils/make_redirects_links.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,10 @@ def main():
172172
fout.write(st)
173173
_log.info('Done links and redirects')
174174
# change the canonical url for all html to the newest version in the docs:
175-
for entry in os.scandir('./'):
176-
if entry.is_dir() and (entry.name in tocheck[1:]):
177-
_log.info(f'TOP DIR: {entry.name}')
178-
do_canonicals(entry.name)
179175

176+
pool = multiprocessing.Pool()
177+
pool.map(do_canonicals, tocheck[1:])
178+
pool.close()
180179

181180
if __name__ == "__main__":
182181
main()

0 commit comments

Comments
 (0)