Skip to content

Commit f8cee09

Browse files
committed
Drop now not really usefull parallelism.
As we're only doing daily builds. It simplifies the code and the log reading.
1 parent 6bfedfd commit f8cee09

File tree

1 file changed

+16
-37
lines changed

1 file changed

+16
-37
lines changed

build_docs.py

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import shutil
4141
import subprocess
4242
import sys
43-
from concurrent.futures import ALL_COMPLETED, ProcessPoolExecutor, wait
4443
from datetime import datetime
4544

4645

@@ -548,44 +547,24 @@ def main():
548547
# instead of none. "--languages en" builds *no* translation,
549548
# as "en" is the untranslated one.
550549
args.languages = LANGUAGES
551-
with ProcessPoolExecutor(max_workers=args.jobs) as executor:
552-
futures = []
553-
for version, git_branch, devel in branches_to_do:
554-
for language in args.languages:
555-
futures.append(
556-
(
557-
version,
558-
language,
559-
executor.submit(
560-
build_one,
561-
version,
562-
git_branch,
563-
devel,
564-
args.quick,
565-
venv,
566-
args.build_root,
567-
args.group,
568-
args.log_directory,
569-
language,
570-
),
571-
)
572-
)
573-
wait([future[2] for future in futures], return_when=ALL_COMPLETED)
574-
for version, language, future in futures:
550+
for version, git_branch, devel in branches_to_do:
551+
for language in args.languages:
575552
if sentry_sdk:
576553
with sentry_sdk.configure_scope() as scope:
577554
scope.set_tag("version", version)
578555
scope.set_tag("language", language if language else "en")
579-
if future.exception():
580-
logging.error(
581-
"Exception while building %s version %s: %s",
582-
language,
556+
try:
557+
build_one(
583558
version,
584-
future.exception(),
559+
git_branch,
560+
devel,
561+
args.quick,
562+
venv,
563+
args.build_root,
564+
args.group,
565+
args.log_directory,
566+
language,
585567
)
586-
if sentry_sdk:
587-
sentry_sdk.capture_exception(future.exception())
588-
try:
589568
copy_build_to_webroot(
590569
args.build_root,
591570
version,
@@ -595,15 +574,15 @@ def main():
595574
args.skip_cache_invalidation,
596575
args.www_root,
597576
)
598-
except Exception as ex:
577+
except Exception as err:
599578
logging.error(
600-
"Exception while copying to webroot %s version %s: %s",
579+
"Exception while building %s version %s: %s",
601580
language,
602581
version,
603-
ex,
582+
err,
604583
)
605584
if sentry_sdk:
606-
sentry_sdk.capture_exception(ex)
585+
sentry_sdk.capture_exception(err)
607586

608587

609588
if __name__ == "__main__":

0 commit comments

Comments
 (0)