2009-04-27 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/ProducerConsumerServer.pm, lib/PandoraFMS/Server.pm: Properly set task queue size for statistics. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1656 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
dacbda3958
commit
bfb7660e23
|
@ -1,3 +1,9 @@
|
||||||
|
2009-04-27 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/ProducerConsumerServer.pm,
|
||||||
|
lib/PandoraFMS/Server.pm: Properly set task queue size for
|
||||||
|
statistics.
|
||||||
|
|
||||||
2009-04-24 Ramon Novoa <rnovoa@artica.es>
|
2009-04-24 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* lib/PandoraFMS/SNMPServer.pm, lib/PandoraFMS/Core.pm: Generate
|
* lib/PandoraFMS/SNMPServer.pm, lib/PandoraFMS/Core.pm: Generate
|
||||||
|
|
|
@ -110,7 +110,7 @@ sub data_producer ($$$$$) {
|
||||||
my @tasks = &{$self->{'_producer'}}($self);
|
my @tasks = &{$self->{'_producer'}}($self);
|
||||||
|
|
||||||
# Update queue size for statistics
|
# Update queue size for statistics
|
||||||
$self->setQueueSize ($#tasks);
|
$self->setQueueSize (scalar @{$task_queue});
|
||||||
|
|
||||||
foreach my $task (@tasks) {
|
foreach my $task (@tasks) {
|
||||||
$sem->down;
|
$sem->down;
|
||||||
|
|
|
@ -44,6 +44,9 @@ sub new ($$$;$) {
|
||||||
_queue_size => 0,
|
_queue_size => 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Share variables that may be set from different threads
|
||||||
|
share ($self->{'_queue_size'});
|
||||||
|
|
||||||
# Thread kill signal handler
|
# Thread kill signal handler
|
||||||
#$SIG{'KILL'} = sub {
|
#$SIG{'KILL'} = sub {
|
||||||
# threads->exit() if threads->can('exit');
|
# threads->exit() if threads->can('exit');
|
||||||
|
@ -232,7 +235,7 @@ sub stop ($) {
|
||||||
eval {
|
eval {
|
||||||
# Update server status
|
# Update server status
|
||||||
pandora_update_server ($self->{'_pa_config'}, $self->{'_dbh'}, $self->{'_pa_config'}->{'servername'},
|
pandora_update_server ($self->{'_pa_config'}, $self->{'_dbh'}, $self->{'_pa_config'}->{'servername'},
|
||||||
0, $self->{'_server_type'});
|
0, $self->{'_server_type'}, 0, 0);
|
||||||
|
|
||||||
# Generate an event
|
# Generate an event
|
||||||
$self->downEvent ();
|
$self->downEvent ();
|
||||||
|
|
Loading…
Reference in New Issue