minor improvement removing 1 coll to time()
improve logging tell which monitor the event belonged to
This commit is contained in:
parent
60d92d6a59
commit
856a8ce1d0
|
@ -196,10 +196,11 @@ my $last_action = 0;
|
|||
|
||||
while( 1 )
|
||||
{
|
||||
if ( (time() - $last_action) > $Config{ZM_FILTER_RELOAD_DELAY} )
|
||||
my $now = time;
|
||||
if ( ($now - $last_action) > $Config{ZM_FILTER_RELOAD_DELAY} )
|
||||
{
|
||||
Debug( "Reloading filters\n" );
|
||||
$last_action = time();
|
||||
$last_action = $now;
|
||||
$filters = getFilters( $filter_parm );
|
||||
}
|
||||
|
||||
|
@ -632,7 +633,7 @@ sub checkFilter
|
|||
{
|
||||
if ( $delete_ok )
|
||||
{
|
||||
Info( "Deleting event $event->{Id}\n" );
|
||||
Info( "Deleting event $event->{Id} from Monitor $event->{MonitorId}\n" );
|
||||
# Do it individually to avoid locking up the table for new events
|
||||
my $sql = "delete from Events where Id = ?";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
|
|
Loading…
Reference in New Issue