-
Improvement
-
Resolution: Fixed
-
Minor
-
3.9.12, 3.10.9, 3.11.5, 4.4
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_404_STABLE
-
MOODLE_404_STABLE
-
MDL-73703-master -
-
2
-
Team Hedgehog 2023 Sprint 4.1, Team Hedgehog 2023 Sprint 4.2, Team Hedgehog 2023 Sprint 4.3, Team Hedgehog 2023 Review 4, Team Hedgehog 2024 Sprint 1.1
sync_users() updates all qualifying users in one big transaction. This may take a very long time for large number of users. This is especially apparent when the LDAP server and the Moodle server are not geographically colocated.
This patch will:
1) Update users in chunks of configurable size
2) When sync_users() is invoked from the sync_task it will delegate each chunk to an ad-hoc task, so the update is run in parallel
The chunk size is configurable and you can control how many ad-hoc tasks are run using Moodle settings. This allows orgs to tune the processing time and resources.