Linting + touches
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import json
|
import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
|
||||||
from app.config import settings
|
from app.config import settings
|
||||||
from app.models import NodeConfig, SystemConfig
|
from app.models import NodeConfig, SystemConfig
|
||||||
from app.internal.logger import logger
|
from app.internal.logger import logger
|
||||||
|
|||||||
@@ -116,7 +116,8 @@ class RadioBot:
|
|||||||
def _on_stream_end(self, error):
|
def _on_stream_end(self, error):
|
||||||
if error:
|
if error:
|
||||||
logger.error(f"Stream ended with error: {error}")
|
logger.error(f"Stream ended with error: {error}")
|
||||||
if not (self._loop and self._voice_client and self._voice_client.is_connected() and not self._voice_client.is_playing()):
|
vc = self._voice_client
|
||||||
|
if not (self._loop and vc and vc.is_connected() and not vc.is_playing()):
|
||||||
return
|
return
|
||||||
if error:
|
if error:
|
||||||
# Back off before retrying — prevents tight loop when PulseAudio is unavailable
|
# Back off before retrying — prevents tight loop when PulseAudio is unavailable
|
||||||
|
|||||||
@@ -44,7 +44,10 @@ async def on_call_end(data: dict):
|
|||||||
else:
|
else:
|
||||||
logger.error(f"Audio upload failed for call {data['call_id']}. Verify C2_URL and Node API Key.")
|
logger.error(f"Audio upload failed for call {data['call_id']}. Verify C2_URL and Node API Key.")
|
||||||
else:
|
else:
|
||||||
logger.warning(f"No recording file generated for call {data['call_id']} — call may have been too short or Icecast unreachable.")
|
logger.warning(
|
||||||
|
f"No recording file generated for call {data['call_id']} "
|
||||||
|
"— call may have been too short or Icecast unreachable."
|
||||||
|
)
|
||||||
await mqtt_manager.publish_metadata("call_end", data)
|
await mqtt_manager.publish_metadata("call_end", data)
|
||||||
await mqtt_manager.publish_status("online")
|
await mqtt_manager.publish_status("online")
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# Icecast streaming server
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## OP25 Core Container
|
# OP25 Core Container
|
||||||
FROM python:slim-trixie
|
FROM python:slim-trixie
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
|
|||||||
Reference in New Issue
Block a user