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

cleanup and reorganize cron execution order

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.2
    • 2.1
    • Administration
    • None
    • MOODLE_21_STABLE
    • MOODLE_22_STABLE
    • w42_MDL-29670_m22_croncleanup
    • Hide

      1/ set up stuff that is normally executed from cron
      2/ execute cron and look for notices or errors
      3/ fake some unconfirmed and incomplete users by direct DB edits and execute cron till the cleanup deletes the users
      4/ verify users are deleted properly

      Show
      1/ set up stuff that is normally executed from cron 2/ execute cron and look for notices or errors 3/ fake some unconfirmed and incomplete users by direct DB edits and execute cron till the cleanup deletes the users 4/ verify users are deleted properly

      The current order of execution in cron.php seems incorrect:
      1/ mod/* should be executed after auth and enrol
      2/ we should build missing context paths in every execution - this is very cheap and all the other stuff may break if there are missing context paths
      3/ all the slow stuff doing external requests should be at the end - such as blog, backups, file storage, etc.
      4/ mtrace('checking for create_password'); should be done in each cron run - it is fast and necessary to be done asap
      5/ unconfirmed user deleting is very wrong - we need to first delete_user() and only then drop the record
      6/ there is no place for module specific mess in main cron! /mod/quiz/report/
      7/ remove unnecessary flush() - it is already part of mtrace()
      8/ move notify_login_failures() to cronlib and execute in each run for security reasons

            skodak Petr Skoda
            skodak Petr Skoda
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Sam Hemelryk Sam Hemelryk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.