mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 17:12:16 +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
@@ -1,6 +1,7 @@
|
||||
"""Run recording maintainer and cleanup."""
|
||||
|
||||
import logging
|
||||
from multiprocessing.synchronize import Event as MpEvent
|
||||
|
||||
from playhouse.sqliteq import SqliteQueueDatabase
|
||||
|
||||
@@ -13,8 +14,8 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class RecordProcess(FrigateProcess):
|
||||
def __init__(self, config: FrigateConfig) -> None:
|
||||
super().__init__(name="frigate.recording_manager", daemon=True)
|
||||
def __init__(self, config: FrigateConfig, stop_event: MpEvent) -> None:
|
||||
super().__init__(stop_event, name="frigate.recording_manager", daemon=True)
|
||||
self.config = config
|
||||
|
||||
def run(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user