Skip to content

Commit

Permalink
Tear down FS between cron jobs (#26223)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Vincent Petry authored and DeepDiver1975 committed Sep 30, 2016
1 parent ebf8a02 commit 8b20b12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cron.php
Expand Up @@ -120,6 +120,8 @@

$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);
Expand Down

0 comments on commit 8b20b12

Please sign in to comment.