Sort elements by ILIAS id to ensure deterministic ordering

This commit is contained in:
I-Al-Istannen
2021-07-06 17:45:12 +02:00
parent 8ec3f41251
commit ee67f9f472
2 changed files with 15 additions and 0 deletions

View File

@ -230,6 +230,8 @@ instance's greatest bottleneck.
# Fill up our task list with the found elements
await gather_elements()
elements.sort(key=lambda e: e.id())
tasks: List[Awaitable[None]] = []
for element in elements:
if handle := await self._handle_ilias_element(PurePath("."), element):
@ -280,6 +282,8 @@ instance's greatest bottleneck.
# Fill up our task list with the found elements
await gather_elements()
elements.sort(key=lambda e: e.id())
tasks: List[Awaitable[None]] = []
for element in elements:
if handle := await self._handle_ilias_element(cl.path, element):