Add warning about event-loop in ILIASCrawler

This commit is contained in:
be7a 2021-04-29 00:02:03 +02:00
parent 3eab236b99
commit c800d307db
No known key found for this signature in database
GPG key ID: 6510870A77F49A99
2 changed files with 7 additions and 3 deletions

View file

@ -130,6 +130,11 @@ class IliasCrawler:
):
"""
Create a new ILIAS crawler.
Warning: This will create syncronization primitives
that are tied to the currently running event
loop. This means you cant use asyncio.run but
will need to use run_until_completion when using
methodes.
"""
self._base_url = base_url
self._client = client

View file

@ -239,7 +239,6 @@ class Pferd(Location):
)
self._ilias_targets.append(target)
def add_ilias_folder(
self,
ilias: IliasSycronizer,
@ -269,8 +268,8 @@ class Pferd(Location):
file_conflict_resolver {FileConflictResolver} -- A function specifying how to deal
with overwriting or deleting files. The default always asks the user.
"""
PRETTY.starting_synchronizer(target, "ILIAS", "An ILIAS element by url")
PRETTY.starting_synchronizer(
target, "ILIAS", "An ILIAS element by url")
results = ilias.add_target(
lambda crawler: crawler.recursive_crawl_url(full_url),