Run generated avatar cleanup as expensive task

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2019-05-21 11:05:04 +02:00
parent 5b602723b1
commit 1aecee52f9
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
2 changed files with 2 additions and 1 deletions

View File

@ -147,7 +147,6 @@ class Repair implements IOutput {
new RepairInvalidPaths(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig()),
new AddLogRotateJob(\OC::$server->getJobList()),
new ClearFrontendCaches(\OC::$server->getMemCacheFactory(), \OC::$server->query(SCSSCacher::class), \OC::$server->query(JSCombiner::class)),
new ClearGeneratedAvatarCache(\OC::$server->getConfig(), \OC::$server->query(AvatarManager::class)),
new AddPreviewBackgroundCleanupJob(\OC::$server->getJobList()),
new AddCleanupUpdaterBackupsJob(\OC::$server->getJobList()),
new RepairPendingCronJobs(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig()),
@ -166,6 +165,7 @@ class Repair implements IOutput {
*/
public static function getExpensiveRepairSteps() {
return [
new ClearGeneratedAvatarCache(\OC::$server->getConfig(), \OC::$server->query(AvatarManager::class)),
new OldGroupMembershipShares(\OC::$server->getDatabaseConnection(), \OC::$server->getGroupManager())
];
}

View File

@ -51,6 +51,7 @@ class ClearGeneratedAvatarCache implements IRepairStep {
* @return boolean
*/
private function shouldRun() {
return true;
$versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0');
// was added to 15.0.0.4