mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-16 16:15:22 +03:00
Reduce timeout
This commit is contained in:
parent
c52c984306
commit
203e767338
@ -23,7 +23,7 @@ class EmbeddingsResponder:
|
|||||||
|
|
||||||
def check_for_request(self, process: Callable) -> None:
|
def check_for_request(self, process: Callable) -> None:
|
||||||
while True: # load all messages that are queued
|
while True: # load all messages that are queued
|
||||||
has_message, _, _ = zmq.select([self.socket], [], [], 0.1)
|
has_message, _, _ = zmq.select([self.socket], [], [], 0.01)
|
||||||
|
|
||||||
if not has_message:
|
if not has_message:
|
||||||
break
|
break
|
||||||
|
|||||||
@ -123,7 +123,7 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
|
|
||||||
def _process_updates(self) -> None:
|
def _process_updates(self) -> None:
|
||||||
"""Process event updates"""
|
"""Process event updates"""
|
||||||
update = self.event_subscriber.check_for_update(timeout=0.1)
|
update = self.event_subscriber.check_for_update(timeout=0.01)
|
||||||
|
|
||||||
if update is None:
|
if update is None:
|
||||||
return
|
return
|
||||||
@ -175,7 +175,7 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
def _process_finalized(self) -> None:
|
def _process_finalized(self) -> None:
|
||||||
"""Process the end of an event."""
|
"""Process the end of an event."""
|
||||||
while True:
|
while True:
|
||||||
ended = self.event_end_subscriber.check_for_update(timeout=0.1)
|
ended = self.event_end_subscriber.check_for_update(timeout=0.01)
|
||||||
|
|
||||||
if ended == None:
|
if ended == None:
|
||||||
break
|
break
|
||||||
@ -265,7 +265,7 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
def _process_event_metadata(self):
|
def _process_event_metadata(self):
|
||||||
# Check for regenerate description requests
|
# Check for regenerate description requests
|
||||||
(topic, event_id, source) = self.event_metadata_subscriber.check_for_update(
|
(topic, event_id, source) = self.event_metadata_subscriber.check_for_update(
|
||||||
timeout=0.1
|
timeout=0.01
|
||||||
)
|
)
|
||||||
|
|
||||||
if topic is None:
|
if topic is None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user