diff options
| author | Fuwn <[email protected]> | 2023-07-26 19:19:50 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-07-26 19:19:50 -0700 |
| commit | d2345ccf98fd0998e57244d4cd35154af25d6456 (patch) | |
| tree | 5fcfc3e0ef0da8bd5de04cb268e2564de235f77e | |
| parent | feat(index): allow username override (diff) | |
| download | old.due.moe-d2345ccf98fd0998e57244d4cd35154af25d6456.tar.xz old.due.moe-d2345ccf98fd0998e57244d4cd35154af25d6456.zip | |
feat(html): dynamic concurrent jobs
| -rw-r--r-- | src/due/html.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/due/html.py b/src/due/html.py index f629afc..7472018 100644 --- a/src/due/html.py +++ b/src/due/html.py @@ -4,6 +4,7 @@ from due.cache import cache from flask import request import math import re +import os def seen(element): @@ -184,8 +185,7 @@ def manga_to_html(releasing_outdated_manga, show_missing): f'<li><a href="https://anilist.co/manga/{id}" target="_blank">{title}</a> {progress} [{available_link}]</li>' ) - # 80 - joblib.Parallel(n_jobs=4, require="sharedmem")( + joblib.Parallel(n_jobs=int(os.getenv("CONCURRENT_JOBS")) or 4, require="sharedmem")( joblib.delayed(process)(media) for media in releasing_outdated_manga ) |