add StartTime to log line about deleting an event.

This commit is contained in:
Isaac Connor 2016-09-28 08:35:19 -04:00
parent 02a196d98b
commit b074a3257d
1 changed files with 5 additions and 5 deletions

View File

@ -240,9 +240,9 @@ sub GenerateVideo {
sub delete {
my $event = $_[0];
Info( "Deleting event $event->{Id} from Monitor $event->{MonitorId}\n" );
Info( "Deleting event $event->{Id} from Monitor $event->{MonitorId} $event->{StartTime}\n" );
# Do it individually to avoid locking up the table for new events
my $sql = "delete from Events where Id = ?";
my $sql = 'delete from Events where Id = ?';
my $sth = $ZoneMinder::Database::dbh->prepare_cached( $sql )
or Fatal( "Can't prepare '$sql': ".$ZoneMinder::Database::dbh->errstr() );
my $res = $sth->execute( $event->{Id} )
@ -250,14 +250,14 @@ sub delete {
$sth->finish();
if ( ! $Config{ZM_OPT_FAST_DELETE} ) {
my $sql = "delete from Frames where EventId = ?";
my $sql = 'delete from Frames where EventId = ?';
my $sth = $ZoneMinder::Database::dbh->prepare_cached( $sql )
or Fatal( "Can't prepare '$sql': ".$ZoneMinder::Database::dbh->errstr() );
my $res = $sth->execute( $event->{Id} )
or Fatal( "Can't execute '$sql': ".$sth->errstr() );
$sth->finish();
$sql = "delete from Stats where EventId = ?";
$sql = 'delete from Stats where EventId = ?';
$sth = $ZoneMinder::Database::dbh->prepare_cached( $sql )
or Fatal( "Can't prepare '$sql': ".$ZoneMinder::Database::dbh->errstr() );
$res = $sth->execute( $event->{Id} )
@ -266,7 +266,7 @@ sub delete {
$event->delete_files( );
} else {
Debug("Not deleting frames, stats and files for speed.");
Debug('Not deleting frames, stats and files for speed.');
}
} # end sub delete