feat: add error handling for state fetching in App component

This commit is contained in:
2026-03-01 15:10:57 +01:00
parent 6497eb9770
commit cb8007074e
2 changed files with 13 additions and 1 deletions

View File

@@ -3,6 +3,8 @@ import io
import json
import time
from minio import Minio
import redis
import os
DEFAULT_STATE = {
"text": {
@@ -27,7 +29,7 @@ MINIO_CLIENT = Minio(
secure=True,
)
BUCKET = "tv-control"
r = redis.Redis(host='194.15.36.205',username="default", port=12004, db=12, password=os.getenv("REDIS"))
def _read_state():
try:
with open("/app/state.json", "r") as f: