modify metadata recording conditions
This commit is contained in:
@@ -178,10 +178,7 @@ class MetadataCollector:
|
||||
|
||||
def save(self):
|
||||
"""Serialize collected events and upload as JSON to S3."""
|
||||
scheme = "https" if os.getenv("AWS_S3_SECURE_ACCESS", "False").lower() == "true" else "http"
|
||||
endpoint = os.getenv("AWS_S3_ENDPOINT_URL", "")
|
||||
url = f"{scheme}://{endpoint}/{self.bucket_name}/{self.output_filename}"
|
||||
logger.info("Persisting metadata to %s", url)
|
||||
logger.info("Persisting metadata...")
|
||||
|
||||
participants = []
|
||||
for k, v in self.participants.items():
|
||||
|
||||
@@ -340,11 +340,7 @@ class RoomViewSet(
|
||||
status=drf_status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||
)
|
||||
|
||||
|
||||
if (
|
||||
settings.METADATA_COLLECTOR_ENABLED
|
||||
and recording.mode == models.RecordingModeChoices.TRANSCRIPT
|
||||
):
|
||||
if settings.METADATA_COLLECTOR_ENABLED and recording.options.transcribe:
|
||||
try:
|
||||
MetadataCollectorService().start(recording)
|
||||
except MetadataCollectorException:
|
||||
|
||||
@@ -178,10 +178,9 @@ class LiveKitEventsService:
|
||||
except utils.MetadataUpdateException as e:
|
||||
logger.exception("Failed to update room's metadata: %s", e)
|
||||
|
||||
|
||||
if (
|
||||
settings.METADATA_COLLECTOR_ENABLED
|
||||
and recording.mode == models.RecordingModeChoices.TRANSCRIPT
|
||||
and recording.options.get("metadata_collector_dispatch_id")
|
||||
):
|
||||
try:
|
||||
MetadataCollectorService().stop(recording)
|
||||
|
||||
Reference in New Issue
Block a user