mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
exit on config errors
This commit is contained in:
parent
f78b2c48a7
commit
527db52d5e
@ -4,6 +4,7 @@ import multiprocessing as mp
|
|||||||
import os
|
import os
|
||||||
from logging.handlers import QueueHandler
|
from logging.handlers import QueueHandler
|
||||||
from typing import Dict, List
|
from typing import Dict, List
|
||||||
|
import sys
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
from playhouse.sqlite_ext import SqliteExtDatabase
|
from playhouse.sqlite_ext import SqliteExtDatabase
|
||||||
@ -139,8 +140,12 @@ class FrigateApp():
|
|||||||
def start(self):
|
def start(self):
|
||||||
self.init_logger()
|
self.init_logger()
|
||||||
self.ensure_dirs()
|
self.ensure_dirs()
|
||||||
# TODO: exit if config doesnt parse
|
try:
|
||||||
self.init_config()
|
self.init_config()
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Error parsing config: {e}")
|
||||||
|
self.log_process.terminate()
|
||||||
|
sys.exit(1)
|
||||||
self.init_queues()
|
self.init_queues()
|
||||||
self.init_database()
|
self.init_database()
|
||||||
self.init_mqtt()
|
self.init_mqtt()
|
||||||
|
Loading…
Reference in New Issue
Block a user