♻️(backend) extract livekit API client creation to reusable utility
Create dedicated utility function for livekit API client initialization. Centralizes configuration logic including custom session handling for SSL verification. Improves code reuse across backend components that interact with LiveKit.
This commit is contained in:
committed by
aleb_the_flash
parent
2ef95aa835
commit
ae17fbdaa8
@@ -14,7 +14,6 @@ from django.core.cache import cache
|
||||
from asgiref.sync import async_to_sync
|
||||
from livekit.api import ( # pylint: disable=E0611
|
||||
ListRoomsRequest,
|
||||
LiveKitAPI,
|
||||
SendDataRequest,
|
||||
TwirpError,
|
||||
)
|
||||
@@ -347,7 +346,7 @@ class LobbyService:
|
||||
"type": settings.LOBBY_NOTIFICATION_TYPE,
|
||||
}
|
||||
|
||||
lkapi = LiveKitAPI(**settings.LIVEKIT_CONFIGURATION)
|
||||
lkapi = utils.create_livekit_client()
|
||||
|
||||
try:
|
||||
room_response = await lkapi.room.list_rooms(
|
||||
|
||||
Reference in New Issue
Block a user