From f40820c41fd110465ad5cb2172e3f547a2b6fea6 Mon Sep 17 00:00:00 2001 From: Joscha Date: Mon, 31 May 2021 21:07:13 +0200 Subject: [PATCH] Warn if using concurrent tasks with kit-ilias-web --- CHANGELOG.md | 1 + PFERD/crawl/ilias/kit_ilias_web_crawler.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 451853b..51e9a5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ ambiguous situations. ### Added - `credential-file` authenticator - `--credential-file` option for `kit-ilias-web` command +- Warning if using concurrent tasks with `kit-ilias-web` ### Fixed - Date parsing now also works correctly in non-group exercises diff --git a/PFERD/crawl/ilias/kit_ilias_web_crawler.py b/PFERD/crawl/ilias/kit_ilias_web_crawler.py index fbbfc1b..78428e0 100644 --- a/PFERD/crawl/ilias/kit_ilias_web_crawler.py +++ b/PFERD/crawl/ilias/kit_ilias_web_crawler.py @@ -21,7 +21,6 @@ TargetType = Union[str, int] class KitIliasWebCrawlerSection(HttpCrawlerSection): - def target(self) -> TargetType: target = self.s.get("target") if not target: @@ -164,6 +163,12 @@ class KitIliasWebCrawler(HttpCrawler): auth = section.auth(authenticators) super().__init__(name, section, config, shared_auth=auth) + if section.tasks() > 1: + log.warn(""" +Please avoid using too many parallel requests as these are the KIT ILIAS +instance's greatest bottleneck. + """.strip()) + self._shibboleth_login = KitShibbolethLogin( auth, section.tfa_auth(authenticators),