2011-08-16 Sergio Martin <sergio.martin@artica.es>
* lib/PandoraFMS/Core.pm bin/pandora_server: Improved Enterprise check to the policy queue thread and fix a memory problem in the queue patrol loop git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3f0737c55a
commit
1ac23479f5
|
@ -1,3 +1,9 @@
|
|||
2011-08-16 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Core.pm
|
||||
bin/pandora_server: Improved Enterprise check to the policy queue
|
||||
thread and fix a memory problem in the queue patrol loop
|
||||
|
||||
2011-08-16 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* lib/PandoraFMS/DataServer.pm: When reading module tags use
|
||||
|
|
|
@ -199,7 +199,7 @@ if ($Config{'daemon'} == 1) {
|
|||
}
|
||||
|
||||
# Start thread to patrol policy queue
|
||||
if ($Config{'pandora_master'} == 1) {
|
||||
if (enterprise_load (\%Config) != 0 && $Config{'pandora_master'} == 1) {
|
||||
my $thr = threads->create('pandora_process_policy_queue', (\%Config));
|
||||
}
|
||||
|
||||
|
|
|
@ -2275,6 +2275,9 @@ sub pandora_process_policy_queue ($) {
|
|||
$pa_config{'dbuser'}, $pa_config{'dbpass'});
|
||||
|
||||
while(1) {
|
||||
# Check the queue each 5 seconds
|
||||
sleep (5);
|
||||
|
||||
my $operation = enterprise_hook('get_first_policy_queue', [$dbh]);
|
||||
next unless (defined ($operation) && $operation ne '');
|
||||
|
||||
|
@ -2291,9 +2294,6 @@ sub pandora_process_policy_queue ($) {
|
|||
}
|
||||
|
||||
enterprise_hook('pandora_finish_queue_operation', [$dbh, $operation->{'id'}]);
|
||||
|
||||
# Check the queue each 5 seconds
|
||||
sleep (5);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue