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

Sort ad-hoc tasks by "nextruntime"

    XMLWordPrintable

    Details

      Description

      Currently, there is no sorting in `get_next_adhoc_task()` method:

      https://github.com/moodle/moodle/blob/2c0b08c5a7e8c682f0621abb74a5eaf3817b0114/lib/classes/task/manager.php#L562-L564

      Therefore, database engine returns unsorted set of records and under some circumstances records with more recent `nextruntime` can go ahead of records with later `nextruntime`.

      In scenario when we are catching up with some ad-hoc tasks we want the latest tasks to be processed first.

      To guarantee this we should add explicit sorting by `nextruntime`.

        Attachments

          Activity

            People

            Assignee:
            mikhailgolenkov Mikhail Golenkov
            Reporter:
            mikhailgolenkov Mikhail Golenkov
            Peer reviewer:
            Brendan Heywood
            Integrator:
            Jun Pataleta
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Mar/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m