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

Add a timecreated field to the adhoc task table

XMLWordPrintable

    • MOODLE_310_STABLE
    • MOODLE_310_STABLE
    • MDL-69170-adhoc-task-timestamp
    • 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 https://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 https: //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.  

      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.

            peterburnett Peter Burnett
            peterburnett Peter Burnett
            Mihail Geshoski Mihail Geshoski
            Andrew Lyons Andrew Lyons
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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