#8899 Fixed history_db_enabled
This commit is contained in:
parent
9fd4e415c0
commit
9a7e0e3228
|
@ -1619,48 +1619,51 @@ function config_update_config()
|
|||
$dbm->process();
|
||||
} else if ($dbm->check() !== true) {
|
||||
$errors[] = $dbm->getLastError();
|
||||
config_update_value('history_db_enabled', false);
|
||||
}
|
||||
|
||||
if ($dbm->check() === true) {
|
||||
// Historical configuration tokens (stored in historical db).
|
||||
if (Config::set(
|
||||
'days_purge',
|
||||
get_parameter('history_dbh_purge'),
|
||||
true
|
||||
) !== true
|
||||
) {
|
||||
$error_update[] = __('Historical database purge');
|
||||
}
|
||||
|
||||
if (Config::set(
|
||||
'history_partitions_auto',
|
||||
get_parameter_switch('history_partitions_auto', 0),
|
||||
true
|
||||
) !== true
|
||||
) {
|
||||
$error_update[] = __('Historical database partitions');
|
||||
}
|
||||
|
||||
if (Config::set(
|
||||
'event_purge',
|
||||
get_parameter('history_dbh_events_purge'),
|
||||
true
|
||||
) !== true
|
||||
) {
|
||||
$error_update[] = __('Historical database events purge');
|
||||
}
|
||||
|
||||
if (Config::set(
|
||||
'string_purge',
|
||||
get_parameter('history_dbh_string_purge'),
|
||||
true
|
||||
) !== true
|
||||
) {
|
||||
$error_update[] = __('Historical database string purge');
|
||||
}
|
||||
|
||||
// Disable history db in history db.
|
||||
Config::set('history_db_enabled', 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
// Historical configuration tokens (stored in historical db).
|
||||
if (Config::set(
|
||||
'days_purge',
|
||||
get_parameter('history_dbh_purge'),
|
||||
true
|
||||
) !== true
|
||||
) {
|
||||
$error_update[] = __('Historical database purge');
|
||||
}
|
||||
|
||||
if (Config::set(
|
||||
'history_partitions_auto',
|
||||
get_parameter_switch('history_partitions_auto', 0),
|
||||
true
|
||||
) !== true
|
||||
) {
|
||||
$error_update[] = __('Historical database partitions');
|
||||
}
|
||||
|
||||
if (Config::set(
|
||||
'event_purge',
|
||||
get_parameter('history_dbh_events_purge'),
|
||||
true
|
||||
) !== true
|
||||
) {
|
||||
$error_update[] = __('Historical database events purge');
|
||||
}
|
||||
|
||||
if (Config::set(
|
||||
'string_purge',
|
||||
get_parameter('history_dbh_string_purge'),
|
||||
true
|
||||
) !== true
|
||||
) {
|
||||
$error_update[] = __('Historical database string purge');
|
||||
}
|
||||
|
||||
// Disable history db in history db.
|
||||
Config::set('history_db_enabled', 0, true);
|
||||
break;
|
||||
|
||||
case 'ehorus':
|
||||
|
|
Loading…
Reference in New Issue