mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
added config options sleep_delay and sleep_monitor
sleep_monitor replaces the old SLEEP_MONITOR define and makes it configurable; this is the interval in which we monitor sleep_delay replaces the old sleep(300) when waiting for the master to recover.
This commit is contained in:
7
config.c
7
config.c
@@ -52,6 +52,9 @@ parse_config(const char *config_file, t_configuration_options *options)
|
||||
options->reconnect_attempts = 6;
|
||||
options->reconnect_intvl = 10;
|
||||
|
||||
options->sleep_monitor = 2;
|
||||
options->sleep_delay = 300;
|
||||
|
||||
/*
|
||||
* Since some commands don't require a config file at all, not
|
||||
* having one isn't necessarily a problem.
|
||||
@@ -122,6 +125,10 @@ parse_config(const char *config_file, t_configuration_options *options)
|
||||
strncpy (options->pgctl_options, value, MAXLEN);
|
||||
else if (strcmp(name, "logfile") == 0)
|
||||
strncpy(options->logfile, value, MAXLEN);
|
||||
else if (strcmp(name, "sleep_monitor") == 0)
|
||||
options->sleep_monitor = atoi(value);
|
||||
else if (strcmp(name, "sleep_delay") == 0)
|
||||
options->sleep_delay = atoi(value);
|
||||
else
|
||||
log_warning(_("%s/%s: Unknown name/value pair!\n"), name, value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user