mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Slave servers should not check the policy queue or replicate events.
(cherry picked from commit d41f8802f634ebf3619032be8537dc5fe105b45c)
This commit is contained in:
parent
08923f6bd5
commit
044b9e374a
@ -4228,6 +4228,13 @@ sub pandora_process_event_replication ($) {
|
||||
logger($pa_config, "Starting replication events process.", 1);
|
||||
|
||||
while(1) {
|
||||
|
||||
# If we are not the master server sleep and check again.
|
||||
if (pandora_is_master($pa_config) == 0) {
|
||||
sleep ($pa_config->{'server_threshold'});
|
||||
next;
|
||||
}
|
||||
|
||||
# Check the queue each N seconds
|
||||
sleep ($replication_interval);
|
||||
enterprise_hook('pandora_replicate_copy_events',[$pa_config, $dbh, $dbh_metaconsole, $metaconsole_server_id, $replication_mode]);
|
||||
@ -4252,6 +4259,13 @@ sub pandora_process_policy_queue ($) {
|
||||
logger($pa_config, "Starting policy queue patrol process.", 1);
|
||||
|
||||
while(1) {
|
||||
|
||||
# If we are not the master server sleep and check again.
|
||||
if (pandora_is_master($pa_config) == 0) {
|
||||
sleep ($pa_config->{'server_threshold'});
|
||||
next;
|
||||
}
|
||||
|
||||
# Check the queue each 5 seconds
|
||||
sleep (5);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user