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

Add a timecreated field to the adhoc task table

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Waiting for peer review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: Tasks
    • Testing Instructions:
      Hide

      Pre-requisites:

      We need the ability to quickly queue adhoc tasks.

      • install tool_testtasks to generate adhoc tasks for use in testing

       

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

      * Proceed with the upgrade.

       

      Test adhoc task runs

      • Use tool testtasks to queue up and adhoc task

       

      php admin/tool/testtasks/cli/queue_adhoc_tasks.php -n 1
      

      * Open a connection to the database through whatever preferred tool.

      • Run this query to view the task record just created.

       

      SELECT * FROM mdl_task_adhoc;
      

      * Verify that the returned row contains a current timestamp in the 'timecreated' field

      • Run cron.

       

      php admin/cli/cron.php
      

      * After the cron run, run the same SQL query and verify that the task was successfully processed and cleared.

      • The rest is covered by unit tests to confirm everything is still operating properly.

       

      Show
      Pre-requisites: We need the ability to quickly queue adhoc tasks. install tool_testtasks to generate adhoc tasks for use in testing   git clone git @github .com:catalyst/moodle-tool_testtasks.git admin/tool/testtasks * Proceed with the upgrade.   Test adhoc task runs Use tool testtasks to queue up and adhoc task   php admin/tool/testtasks/cli/queue_adhoc_tasks.php -n 1 * Open a connection to the database through whatever preferred tool. Run this query to view the task record just created.   SELECT * FROM mdl_task_adhoc; * Verify that the returned row contains a current timestamp in the 'timecreated' field Run cron.   php admin/cli/cron.php * After the cron run, run the same SQL query and verify that the task was successfully processed and cleared. The rest is covered by unit tests to confirm everything is still operating properly.  
    • Affected Branches:
      MOODLE_40_STABLE
    • Pull Master Branch:
      MDL-69170-adhoc-task-timestamp

      Description

      Currently if you have an adhoc task that is consistently failing, it can be very difficult to find exactly when that task started to go wrong. Adding a simple timecreated field to the task_adhoc table would allow a little more visibility on how long these tasks have been hanging around and help with log trawling to find the cause.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              peterburnett Peter Burnett
              Reporter:
              peterburnett Peter Burnett
              Peer reviewer:
              Mihail Geshoski
              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:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 20 minutes
                  20m