Closed kyle4269 closed 6 months ago
What's your thoughts on checking for end_time before the snapshot is sent for processing?
whats the case where "has_snapshot":false
? i see in this example it's true
. sounds like the event is being sent in mqtt before it's saved to the db and this script is working too fast to try to update an event that hasnt been saved yet. This race condition sounds like a bug in frigate that should be fixed. Why send an event to mqtt that you could do anything with if it techncailly doesnt exist yet?
Probably not correct but, on line 201 I added time.sleep(5). Seems to give Frigate enough time to save the event to the DB. Works well for my driveway, but probably not well enough for a street..
After running in debug mode for a bit, I was able to receive error 404. Looks to be from event 1701194717.030211-sszk97 Looking through the data, the image is first grabbed at 2023-11-28 13:05:17,557 and has_snapshot is False at that point. It's not until 2023-11-28 13:05:18,828 that has_snapshot becomes True. Assuming it's at that point it get entered into the database?
JSON for event 1701194717.030211-sszk97