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

Left over adhoc tasks from uninstalled plugin are never removed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.9.3, 3.10, 3.11
    • Fix Version/s: 3.10.6, 3.11.2
    • Component/s: Tasks
    • Labels:
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE
    • Pull 3.10 Branch:
      MDL-70427-310
    • Pull 3.11 Branch:
      MDL-70427-311
    • Pull Master Branch:
    • Testing Instructions:
      Hide
      1. Prior to starting, ensure cron is disabled for your site (to ensure we can remove the demo adhoc task before cron executes it)
      2. Extract demo plugin mdl70427.zip to your site local/ directory
      3. Login as admin
      4. You'll be prompted to install the demo plugin
      5. Complete installation
      6. Confirm presence of plugin adhoc task from your DB console, e.g.:

        SELECT * FROM moodle.m_task_adhoc;
        

      7. Confirm the component field for the adhoc task is set to "local_mdl70427"
      8. Navigate to Plugins > Local plugins > Manage local plugin in site administration
      9. Uninstall the MDL-70427 Demo plugin
      10. Re-run the DB query from step 6
      11. Confirm that the plugin adhoc task has been removed

      Run unit tests

      $ vendor/bin/phpunit --testsuite core_testsuite --filter core_adhoc_task_testcase
      

      Show
      Prior to starting, ensure cron is disabled for your site (to ensure we can remove the demo adhoc task before cron executes it) Extract demo plugin mdl70427.zip to your site local/ directory Login as admin You'll be prompted to install the demo plugin Complete installation Confirm presence of plugin adhoc task from your DB console, e.g.: SELECT * FROM moodle.m_task_adhoc; Confirm the component field for the adhoc task is set to "local_mdl70427" Navigate to Plugins > Local plugins > Manage local plugin in site administration Uninstall the MDL-70427 Demo plugin Re-run the DB query from step 6 Confirm that the plugin adhoc task has been removed Run unit tests $ vendor/bin/phpunit --testsuite core_testsuite --filter core_adhoc_task_testcase

      Description

      If a plugin is uninstalled it may have scheduled tasks which will now never be run to completion and stay clogging up the cron queue.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pholden Paul Holden
              Reporter:
              brendanheywood Brendan Heywood
              Peer reviewer:
              Simey Lameze Simey Lameze
              Integrator:
              Andrew Lyons Andrew Lyons
              Tester:
              Anna Carissa Sadia Anna Carissa Sadia
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                29/Jul/21

                  Time Tracking

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