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

Cron does not process ad hoc tasks which have been queued since cron started

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.8
    • Fix Version/s: 3.7.3
    • Component/s: Tasks
    • Testing Instructions:
      Hide

      1) Install this plugin just to make testing easier:

      https://github.com/catalyst/moodle-tool_testtasks

      2) Run cron to completion just to make sure it is empty. The next steps need to be done relatively quickly withing the next minute 

      php admin/cli/cron.php 
      

      3) In terminal 1 queue up a 5 second task (5 to make it easy to just around tabs quick enough)

      php admin/tool/testtasks/cli/queue_adhoc_tasks.php -d=5 -n=1
      

      4) In terminal 2 start cron, it should start processing the 5 second task above

      php admin/cli/cron.php

      5) Quickly jump back to terminal 1 and queue up a second 5 second task

      php admin/tool/testtasks/cli/queue_adhoc_tasks.php -d=5 -n=1
      

      6) Confirm that both 5 seconds tasks are processed 

       

      Show
      1) Install this plugin just to make testing easier: https://github.com/catalyst/moodle-tool_testtasks 2) Run cron to completion just to make sure it is empty. The next steps need to be done relatively quickly withing the next minute  php admin/cli/cron.php  3) In terminal 1 queue up a 5 second task (5 to make it easy to just around tabs quick enough) php admin/tool/testtasks/cli/queue_adhoc_tasks.php -d= 5 -n= 1 4) In terminal 2 start cron, it should start processing the 5 second task above php admin/cli/cron.php 5) Quickly jump back to terminal 1 and queue up a second 5 second task php admin/tool/testtasks/cli/queue_adhoc_tasks.php -d= 5 -n= 1 6) Confirm that both 5 seconds tasks are processed   
    • Affected Branches:
      MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull 3.7 Branch:
      MDL-66927-run-new-adhoc-37
    • Pull Master Branch:
      MDL-66927-run-new-adhoc

      Description

      If the adhoc  task part of the cron process has started, and new tasks are added, these are not processed until the next time cron is run.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brendanheywood Brendan Heywood
              Reporter:
              brendanheywood Brendan Heywood
              Peer reviewer:
              Matt Porritt
              Integrator:
              Jun Pataleta
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Nov/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 30 minutes
                  1h 30m