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

Cron throws exceptions during a cache purge as localcachedir is purged

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.8
    • Fix Version/s: None
    • Component/s: Tasks

      Description

      If you run cron:

      php admin/cli/cron.php

      And it is processing an adhoc task, and then in another terminal you purge the cache:

      php admin/cli/purge_caches.php

      Then after the cache is purged the task logging throws an exception because the temp log data has been removed:

      PHP Warning: file_get_contents(/var/lib/sitedata/moodle.local/localcache/86df757d-a79c-45b8-80d4-d4a9b95da3ca/c8fe4276-6313-4f5d-89b4-8871e68c7a8a/task.log): failed to open stream: No such file or directory in /var/www/moodle.local/lib/classes/task/database_logger.php on line 77

      Warning: file_get_contents(/var/lib/sitedata/moodle.local/localcache/86df757d-a79c-45b8-80d4-d4a9b95da3ca/c8fe4276-6313-4f5d-89b4-8871e68c7a8a/task.log): failed to open stream: No such file or directory in /var/www/moodle.local/lib/classes/task/database_logger.php on line 77

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              brendanheywood Brendan Heywood
              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: