N°2240 - Supportability - Maintenance mode

This commit is contained in:
Eric
2019-09-27 18:00:09 +02:00
parent 64434f8065
commit db0a5bd071
2 changed files with 9 additions and 2 deletions

View File

@@ -154,6 +154,8 @@ function ReportError($sMessage, $iErrorCode, $aMoreFields = array())
try
{
SetupUtils::ExitMaintenanceMode(false); // Reset maintenance mode in case of problem
utils::PushArchiveMode(false);
ini_set('max_execution_time', max(3600, ini_get('max_execution_time'))); // Under Windows SQL/backup operations are part of the PHP timeout and require extra time
@@ -307,7 +309,8 @@ try
unlink(APPROOT.'data/hub/compile_authent');
// Load the "production" config file to clone & update it
$oConfig = new Config(APPCONF.'production/'.ITOP_CONFIG_FILE);
SetupUtils::EnterMaintenanceMode($oConfig);
$oRuntimeEnv->InitDataModel($oConfig, true /* model only */);
$aAvailableModules = $oRuntimeEnv->AnalyzeInstallation($oConfig, $oRuntimeEnv->GetBuildDir(), true);
@@ -376,6 +379,10 @@ try
SetupPage::log_error('Debug trace: '.$e->getTraceAsString());
ReportError($e->getMessage(), $e->getCode());
}
finally
{
SetupUtils::ExitMaintenanceMode();
}
break;
default: