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

Completions Task: Optimization by Splitting

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Run scheduled tasks manually and ensure they complete succesfully:
        #Run php admin/tool/task/cli/schedule_task.php --execute=\\core\\task
        completion_daily_task

        #Run php admin/tool/task/cli/schedule_task.php --execute=\\core\\task
        completion_regular_task
      Show
      Run scheduled tasks manually and ensure they complete succesfully: #Run php admin/tool/task/cli/schedule_task.php --execute=\\core\\task completion_daily_task #Run php admin/tool/task/cli/schedule_task.php --execute=\\core\\task completion_regular_task
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull Master Branch:
      MDL-50287-master

      Description

      The current completion cron has three parts.
      The first two take less than a minute (usually) to run, this is what manages the completions themselves.

      The third part is the mark aspect. This marks users onto a course by checking the enrollment types. This process is very slow and can take up to one hour, this can cause sites to slow down or even stop functioning all together if there is more than one site on the same server.

      The proposed solution to this would be to split the completion cron out into two crons one recommended to run daily (the slow one) and one to run every minute (the fast one).

      This ensures that the completion cron can mark completions within a minute without causing sites slowdown.

      This issue affects previous versions of Moodle but we are looking to improve this for Moodle 3.0.

      Once fixed we would expect the completions to update minutely without issue and for the users to still be enrolled once daily.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                joshwillcock Josh Willcock
                Reporter:
                joshwillcock Josh Willcock
                Peer reviewer:
                Dan Poltawski
                Integrator:
                Andrew Nicols
                Tester:
                Adrian Greeve
                Participants:
                Component watchers:
                Sam Marshall, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  16/Nov/15

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days, 1 hour
                  2d 1h
                  Remaining:
                  0m
                  Logged:
                  Time Not Required
                  Not Specified