]> source.dussan.org Git - nextcloud-server.git/commitdiff
[master] Tear down FS between cron jobs (#26223) 1712/head
authorVincent Petry <pvince81@owncloud.com>
Fri, 30 Sep 2016 11:30:16 +0000 (13:30 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 12 Oct 2016 06:37:17 +0000 (08:37 +0200)
Because some cron jobs do not always properly clean up their FS usage
and others might not clean up before setting up the FS, this could
cause potential side effects.

To make sure we exclude side effects, we tear down the FS between cron
jobs.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
cron.php

index a4d2bb8692c531c927763d26c77a13225e47a5ac..6fdc7cb24d389a1a820bc84b59687b4308b9817c 100644 (file)
--- a/cron.php
+++ b/cron.php
@@ -119,6 +119,8 @@ try {
 
                        $logger->debug('Run ' . get_class($job) . ' job with ID ' . $job->getId(), ['app' => 'cron']);
                        $job->execute($jobList, $logger);
+                       // clean up after unclean jobs
+                       \OC_Util::tearDownFS();
                        $logger->debug('Finished ' . get_class($job) . ' job with ID ' . $job->getId(), ['app' => 'cron']);
 
                        $jobList->setLastJob($job);