Add new token to limit events to replicate in metaconsole. Tiquet: #2979

(cherry picked from commit f774a52d90)
This commit is contained in:
m-lopez-f 2015-11-18 15:23:50 +01:00
parent 1433ec304e
commit 58a6e1a416
1 changed files with 6 additions and 0 deletions

View File

@ -217,6 +217,8 @@ function config_update_config () {
if ((int)get_parameter('event_replication') == 1) { if ((int)get_parameter('event_replication') == 1) {
if (!config_update_value ('replication_interval', (int)get_parameter('replication_interval'))) if (!config_update_value ('replication_interval', (int)get_parameter('replication_interval')))
$error_update[] = __('Replication interval'); $error_update[] = __('Replication interval');
if (!config_update_value ('replication_limit', (int)get_parameter('replication_limit')))
$error_update[] = __('Replication limit');
if (!config_update_value ('replication_mode', (string)get_parameter('replication_mode'))) if (!config_update_value ('replication_mode', (string)get_parameter('replication_mode')))
$error_update[] = __('Replication mode'); $error_update[] = __('Replication mode');
if (!config_update_value ('show_events_in_local', (string)get_parameter('show_events_in_local'))) if (!config_update_value ('show_events_in_local', (string)get_parameter('show_events_in_local')))
@ -815,6 +817,10 @@ function config_process_config () {
config_update_value ('replication_interval', 120); config_update_value ('replication_interval', 120);
} }
if (!isset ($config["replication_limit"])) {
config_update_value ('replication_limit', 1000);
}
if (!isset ($config["replication_dbengine"])) { if (!isset ($config["replication_dbengine"])) {
config_update_value ('replication_dbengine', 'mysql'); config_update_value ('replication_dbengine', 'mysql');
} }