add Recording type to variables

This commit is contained in:
leo
2026-03-18 15:12:38 +01:00
parent ca8220aa1a
commit fef4745c77
2 changed files with 6 additions and 4 deletions
@@ -10,6 +10,7 @@ from livekit.protocol.agent_dispatch import (
)
from core import utils
from core.models import Recording
logger = getLogger(__name__)
@@ -22,7 +23,7 @@ class MetadataCollectorService:
"""Wip."""
@async_to_sync
async def start(self, recording):
async def start(self, recording: Recording):
"""Wip."""
lkapi = utils.create_livekit_client()
@@ -60,7 +61,7 @@ class MetadataCollectorService:
return dispatch_id
@async_to_sync
async def stop(self, recording):
async def stop(self, recording: Recording):
"""Wip."""
room_id = str(recording.room.id)
@@ -7,6 +7,7 @@ from logging import getLogger
from livekit import api
from core import models, utils
from core.models import Recording
logger = getLogger(__name__)
@@ -19,7 +20,7 @@ class RecordingEventsService:
"""Handles recording-related LiveKit webhook events."""
@staticmethod
def handle_update(recording, egress_status):
def handle_update(recording: Recording, egress_status):
"""Handle egress status updates and sync recording state to room metadata."""
room_name = str(recording.room.id)
@@ -40,7 +41,7 @@ class RecordingEventsService:
logger.exception("Failed to update room's metadata: %s", e)
@staticmethod
def handle_limit_reached(recording):
def handle_limit_reached(recording: Recording):
"""Stop recording and notify participants when limit is reached."""
recording.status = models.RecordingStatusChoices.STOPPED