Only load the monitors for our server
This commit is contained in:
parent
b8888b9d55
commit
ca9a391d62
|
@ -74,14 +74,14 @@ sleep( START_DELAY );
|
|||
|
||||
my $dbh = zmDbConnect();
|
||||
|
||||
my $sql = "select * from Monitors";
|
||||
my $sql = $Config{ZM_SERVER_ID} ? 'SELECT * FROM Monitors WHERE ServerId=?' : 'SELECT * FROM Monitors';
|
||||
my $sth = $dbh->prepare_cached( $sql )
|
||||
or Fatal( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
|
||||
while( 1 )
|
||||
{
|
||||
my $now = time();
|
||||
my $res = $sth->execute()
|
||||
my $res = $sth->execute( $Config{ZM_SERVER_ID} ? $Config{ZM_SERVER_ID} : () )
|
||||
or Fatal( "Can't execute: ".$sth->errstr() );
|
||||
while( my $monitor = $sth->fetchrow_hashref() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue