Make use of ad-hoc tasks for the chunking of the sync process
Currently the sync will do the following ...... 510001 users received. Syncing... ...... 10000 users in chunk. Syncing...
These chunks are pretty meaningless as all users are still being processed within the same running task. You should generate ad-hoc tasks to process each of those 10000 users chunks. It would also allow the Moodle system to process more users and make use of the scaling parallelism capabilities ad-hoc tasks provide so a full sync could take a fraction of the time - would help with #2146
https://moodledev.io/docs/apis/subsystems/task/adhoc#creating-adhoc-tasks
Hi @aspark21,
Thank you for reporting this.
Over 510K users? That's a record!! I agree if there are indeed that many users, processing them in scheduled tasks is inappropriate. It may even be a problem for the initial sync when using delta sync. In that case ad-hoc task would be the preferable solution.
I'll mark this a feature request and process it accordingly.
Regards, Lai