N°2240 - Supportability - Maintenance mode exit on MTP or core update error

This commit is contained in:
Eric
2020-01-10 14:14:20 +01:00
parent 44ee6baddb
commit 881fc2a1de
5 changed files with 12 additions and 9 deletions

View File

@@ -149,6 +149,10 @@ class MFCompiler
// Cleanup the temporary directory
SetupUtils::rrmdir($sTempTargetDir);
}
if (($this->sEnvironment == 'production') && !$bIsAlreadyInMaintenanceMode)
{
SetupUtils::ExitMaintenanceMode();
}
throw $e;
}
@@ -157,10 +161,6 @@ class MFCompiler
// Move the results to the target directory
SetupUtils::movedir($sTempTargetDir, $sFinalTargetDir);
}
if (($this->sEnvironment == 'production') && !$bIsAlreadyInMaintenanceMode)
{
SetupUtils::ExitMaintenanceMode();
}
// Reset the opcache since otherwise the PHP "model" files may still be cached !!
// In case of bad luck (this happens **sometimes** - see N. 550), we may analyze the database structure