2021-02-17 14:23:32 +01:00
|
|
|
import faulthandler
|
2024-09-17 15:26:25 +02:00
|
|
|
import logging
|
2023-05-29 12:31:17 +02:00
|
|
|
import threading
|
|
|
|
|
2022-04-16 17:40:04 +02:00
|
|
|
from flask import cli
|
2021-02-17 14:23:32 +01:00
|
|
|
|
2024-06-23 15:13:02 +02:00
|
|
|
from frigate.app import FrigateApp
|
2023-05-29 12:31:17 +02:00
|
|
|
|
2020-11-04 13:31:25 +01:00
|
|
|
|
2024-09-17 15:26:25 +02:00
|
|
|
def main() -> None:
|
|
|
|
faulthandler.enable()
|
2020-11-01 15:06:15 +01:00
|
|
|
|
2024-09-17 15:26:25 +02:00
|
|
|
# Clear all existing handlers.
|
|
|
|
logging.basicConfig(
|
|
|
|
level=logging.INFO,
|
|
|
|
handlers=[],
|
|
|
|
force=True,
|
|
|
|
)
|
2020-11-04 04:26:39 +01:00
|
|
|
|
2024-09-17 15:26:25 +02:00
|
|
|
threading.current_thread().name = "frigate"
|
|
|
|
cli.show_server_banner = lambda *x: None
|
|
|
|
|
|
|
|
# Run the main application.
|
|
|
|
FrigateApp().start()
|
2020-11-01 16:56:33 +01:00
|
|
|
|
2024-09-17 15:26:25 +02:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|