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

Check API checks scheduled task faildelay but not adhoc task fail delay

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • MDL-68768-adhoc-task-faildelay-check
    • Hide

      1) Install https://github.com/catalyst/moodle-tool_testtasks

      git clone https://github.com/catalyst/moodle-tool_testtasks.git admin/tool/testtasks 
      

      2) Run cron and make sure it's complete and empty

      php admin/cli/cron.php
      

      3) Check the status report and confirm it's green

      http://moodle.local/report/status/index.php

      4) Queue up some purposefully randomly failing test tasks:

      php admin/tool/testtasks/cli/queue_adhoc_tasks.php -s=10 -n=200

      5) Run the adhoc task runner and confirm you see some exceptions

      php admin/cli/adhoc_task.php -e

      6) View the status report /report/status/index.php and confirm that these fresh failures are shown as an Info:

      Info Tasks max fail delay 170 task(s) failing

      7) Confirm the status report now shows the number and details of the faildelays

      http://moodle.local/report/status/index.php?detail=tool_task_maxfaildelay

       Fail delay: 2 mins - Timed adhoc task (tool_testtasks\task\timed_adhoc_task) ID = 57954
       Fail delay: 1 min - Timed adhoc task (tool_testtasks\task\timed_adhoc_task) ID = 59077
       Fail delay: 1 min - Timed adhoc task (tool_testtasks\task\timed_adhoc_task) ID = 59079
       Fail delay: 1 min - Timed adhoc task (tool_testtasks\task\timed_adhoc_task) ID = 59080
       Fail delay: 1 min - Timed adhoc task (tool_testtasks\task\timed_adhoc_task) ID = 59081

      8) Just into sql and update the faildelay so that they are over the 5 minute warning threshold:

      update mdl_task_adhoc set faildelay = 60 * 6;

      9) Confirm that the report now shows these as a warning

      10) Update the faildelay so that it is over the 4 hour error threshold:

      update mdl_task_adhoc set faildelay = 5 * 60 * 60;

      11) Confirm it is shown as an error.

      Show
      1) Install  https://github.com/catalyst/moodle-tool_testtasks git clone https: //github.com/catalyst/moodle-tool_testtasks.git admin/tool/testtasks  2) Run cron and make sure it's complete and empty php admin/cli/cron.php 3) Check the status report and confirm it's green http://moodle.local/report/status/index.php 4) Queue up some purposefully randomly failing test tasks: php admin/tool/testtasks/cli/queue_adhoc_tasks.php -s= 10 -n= 200 5) Run the adhoc task runner and confirm you see some exceptions php admin/cli/adhoc_task.php -e 6) View the status report /report/status/index.php and confirm that these fresh failures are shown as an Info: Info Tasks max fail delay 170 task(s) failing 7) Confirm the status report now shows the number and details of the faildelays http://moodle.local/report/status/index.php?detail=tool_task_maxfaildelay Fail delay: 2 mins - Timed adhoc task (tool_testtasks\task\timed_adhoc_task) ID = 57954 Fail delay: 1 min - Timed adhoc task (tool_testtasks\task\timed_adhoc_task) ID = 59077 Fail delay: 1 min - Timed adhoc task (tool_testtasks\task\timed_adhoc_task) ID = 59079 Fail delay: 1 min - Timed adhoc task (tool_testtasks\task\timed_adhoc_task) ID = 59080 Fail delay: 1 min - Timed adhoc task (tool_testtasks\task\timed_adhoc_task) ID = 59081 8) Just into sql and update the faildelay so that they are over the 5 minute warning threshold: update mdl_task_adhoc set faildelay = 60 * 6 ; 9) Confirm that the report now shows these as a warning 10) Update the faildelay so that it is over the 4 hour error threshold: update mdl_task_adhoc set faildelay = 5 * 60 * 60 ; 11) Confirm it is shown as an error.

          brendanheywood Brendan Heywood
          brendanheywood Brendan Heywood
          Matt Porritt Matt Porritt
          Sara Arjona (@sarjona) Sara Arjona (@sarjona)
          Anna Carissa Sadia Anna Carissa Sadia
          Votes:
          3 Vote for this issue
          Watchers:
          7 Start watching this issue

            Created:
            Updated:
            Resolved:

              Estimated:
              Original Estimate - 0 minutes
              0m
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 day, 2 hours
              1d 2h

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