mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
Handle SIGINT with forkserver (#18860)
* Pass stopevent from main start * Share stop event across processes * preload modules * remove explicit os._exit call --------- Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
This commit is contained in:
committed by
Blake Blackshear
co-authored by
Josh Hawkins
parent
e1ee6f010f
commit
542bf05bb8
@@ -6,6 +6,7 @@ import logging
|
||||
import os
|
||||
import threading
|
||||
from json.decoder import JSONDecodeError
|
||||
from multiprocessing.synchronize import Event as MpEvent
|
||||
from typing import Any, Union
|
||||
|
||||
import regex
|
||||
@@ -29,9 +30,12 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class EmbeddingProcess(FrigateProcess):
|
||||
def __init__(
|
||||
self, config: FrigateConfig, metrics: DataProcessorMetrics | None
|
||||
self,
|
||||
config: FrigateConfig,
|
||||
metrics: DataProcessorMetrics | None,
|
||||
stop_event: MpEvent,
|
||||
) -> None:
|
||||
super().__init__(name="frigate.embeddings_manager", daemon=True)
|
||||
super().__init__(stop_event, name="frigate.embeddings_manager", daemon=True)
|
||||
self.config = config
|
||||
self.metrics = metrics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user