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

Left over adhoc tasks from uninstalled plugin are never removed

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.9.3, 3.10, 3.11
    • 3.10.6, 3.11.2
    • Tasks
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MDL-70427-310
    • MDL-70427-311
    • 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

        1. MDL-70427.jpg
          27 kB
          Anna Carissa Sadia

        Issue Links

          Activity

            People

              pholden Paul Holden
              brendanheywood Brendan Heywood
              Simey Lameze Simey Lameze
              Andrew Lyons Andrew Lyons
              Anna Carissa Sadia Anna Carissa Sadia
              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:
                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