mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
BUG: Event stuck if recording & snapshot disabled while in-progress (#3023)
* Fix recording getting stuck bug * Fix typo
This commit is contained in:
parent
c424c4b7ef
commit
923d07b1a4
@ -111,6 +111,7 @@ class EventProcessor(threading.Thread):
|
|||||||
|
|
||||||
elif event_type == "end":
|
elif event_type == "end":
|
||||||
if event_data["has_clip"] or event_data["has_snapshot"]:
|
if event_data["has_clip"] or event_data["has_snapshot"]:
|
||||||
|
# Full update for valid end of event
|
||||||
Event.update(
|
Event.update(
|
||||||
label=event_data["label"],
|
label=event_data["label"],
|
||||||
camera=camera,
|
camera=camera,
|
||||||
@ -126,6 +127,12 @@ class EventProcessor(threading.Thread):
|
|||||||
has_clip=event_data["has_clip"],
|
has_clip=event_data["has_clip"],
|
||||||
has_snapshot=event_data["has_snapshot"],
|
has_snapshot=event_data["has_snapshot"],
|
||||||
).where(Event.id == event_data["id"]).execute()
|
).where(Event.id == event_data["id"]).execute()
|
||||||
|
else:
|
||||||
|
# Event ended after clip & snapshot disabled,
|
||||||
|
# only end time should be updated.
|
||||||
|
Event.update(
|
||||||
|
end_time=event_data["end_time"] + event_config.post_capture
|
||||||
|
).where(Event.id == event_data["id"]).execute()
|
||||||
|
|
||||||
del self.events_in_process[event_data["id"]]
|
del self.events_in_process[event_data["id"]]
|
||||||
self.event_processed_queue.put((event_data["id"], camera))
|
self.event_processed_queue.put((event_data["id"], camera))
|
||||||
|
Loading…
Reference in New Issue
Block a user