mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-04 13:47:37 +02:00
Fix healthcheck on stopping (#18476)
This commit is contained in:
parent
27914fc3b8
commit
81f5f362a9
@ -25,7 +25,4 @@ elif [[ "${exit_code_service}" -ne 0 ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# used by the docker healthcheck
|
|
||||||
touch /dev/shm/.frigate-is-stopping
|
|
||||||
|
|
||||||
exec /run/s6/basedir/bin/halt
|
exec /run/s6/basedir/bin/halt
|
||||||
|
@ -6,6 +6,7 @@ import secrets
|
|||||||
import shutil
|
import shutil
|
||||||
from multiprocessing import Queue
|
from multiprocessing import Queue
|
||||||
from multiprocessing.synchronize import Event as MpEvent
|
from multiprocessing.synchronize import Event as MpEvent
|
||||||
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
@ -685,6 +686,9 @@ class FrigateApp:
|
|||||||
def stop(self) -> None:
|
def stop(self) -> None:
|
||||||
logger.info("Stopping...")
|
logger.info("Stopping...")
|
||||||
|
|
||||||
|
# used by the docker healthcheck
|
||||||
|
Path("/dev/shm/.frigate-is-stopping").touch()
|
||||||
|
|
||||||
self.stop_event.set()
|
self.stop_event.set()
|
||||||
|
|
||||||
# set an end_time on entries without an end_time before exiting
|
# set an end_time on entries without an end_time before exiting
|
||||||
|
Loading…
Reference in New Issue
Block a user