Check in db a second time for the event. Long running zmaudits can find an event in the fs that was created after we loaded all the db events.
This commit is contained in:
parent
8301f5d039
commit
b3703a5eed
|
@ -454,6 +454,12 @@ MAIN: while( $loop ) {
|
|||
my $Event = $fs_events->{$fs_event_id};
|
||||
|
||||
if ( ! defined( $db_events->{$fs_event_id} ) ) {
|
||||
# Long running zmaudits can find events that were created after we loaded all db events.
|
||||
# So do a secondary lookup
|
||||
if ( ZoneMinder::Event->find_one(Id=>$fs_event_id) ) {
|
||||
Debug("$$Event{Id} found in secondary lookup.");
|
||||
next;
|
||||
}
|
||||
my $age = $Event->age();
|
||||
|
||||
if ( $age > $Config{ZM_AUDIT_MIN_AGE} ) {
|
||||
|
|
Loading…
Reference in New Issue