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

file_temp_cleanup_task only does a partial delete.

XMLWordPrintable

    • MOODLE_29_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • wip-MDL-48252-master
    • Hide
      1. Create a course.
      2. Create a failed backup. I edited the backup_stepslib.php file and put a die(); in one of the functions.
      3. Check moodledata/temp/backup and ensure that there are directories listed there.
      4. Update the scheduled task "Clean up failed backup files from the temp directory" [Site administration ► Server ► Scheduled tasks] and change all of the times to '*'.
      5. I don't recommend waiting a week to see if the files get deleted, so I would change the following (lib/classes/task/file_temp_cleanup_task.php):

        $time = strtotime('-1 week');
        

        to

        $time = strtotime('-1 minute');
        

      6. Run the cron.
      7. Have a look in the temp/backup directory and check that all of the directories have been removed.
      Show
      Create a course. Create a failed backup. I edited the backup_stepslib.php file and put a die(); in one of the functions. Check moodledata/temp/backup and ensure that there are directories listed there. Update the scheduled task "Clean up failed backup files from the temp directory" [Site administration ► Server ► Scheduled tasks] and change all of the times to '*'. I don't recommend waiting a week to see if the files get deleted, so I would change the following (lib/classes/task/file_temp_cleanup_task.php): $time = strtotime('-1 week'); to $time = strtotime('-1 minute'); Run the cron. Have a look in the temp/backup directory and check that all of the directories have been removed.
    • BACKEND Sprint 18

      file_temp_cleanup_task will only delete the most extreme children in a directory structure.
      The code looks to see what time the file was modified, if it is older than a week it is deleted. Unfortunately the directory that the file was in has the time modified field changed and the directory is not removed until a week later when it eventually fits the criteria again.

            abgreeve Adrian Greeve
            abgreeve Adrian Greeve
            Sam Hemelryk Sam Hemelryk
            Dan Poltawski Dan Poltawski
            Zachary Durber Zachary Durber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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