Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-64610

Add support for per-task concurrency limits



    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: Tasks


      MDL-64347 added limits to the number of concurrent task runners, but the suggestion was made to add a per-task concurrency limit for adhoc tasks too.

      Essentially we want to provide a way to set a limit for the number of times that an adhoc task can run at once (in the case of multiple instances of a single task).

      This becomes increasingly important as we increase the use of adhoc tasks.
      We are currently using them for privacy exports, and MDL-46881 seeks to move forum cron processing to adhoc tasks too. Additionally there is a suggested plan to move backup and restore to adhoc tasks.

      Each of these tasks has different load patterns. Whilst privacy tends to have a smaller number of heavy tasks, the forum will have a larger number of very lightweight tasks.

      This issue proposes to allow different concurrency limits for the different tasks.

      We need to decide:

      1. is it okay to only allow setting in config.php
      2. do we want the ability for adhoc tasks to have a way to specify a default concurrency
      3. do we want a UI to configure these?

      I think that we definitely want items 1, and 2. We will probably want item 3 (though we could potentially defer this).

      I do feel that this issue is highly important as the load patterns of different adhoc tasks will significantly change as we increase their usage in different areas.
      Without this functionality we may find that privacy exports lock all potential adhoc task runners and block any forum tasks as a result.


          Issue Links



              • Votes:
                3 Vote for this issue
                9 Start watching this issue


                • Created: