Open source video conferencing app powered by LiveKit. Built with Django and React.
♻️(backend) factorize regex used in the S3 event parser
lebaudantoinef8b0746e737e
diff --git a/src/backend/core/recording/event/parsers.py b/src/backend/core/recording/event/parsers.pyindex 9fb195ed..8398beff 100644--- a/src/backend/core/recording/event/parsers.py+++ b/src/backend/core/recording/event/parsers.py@@ -9,6 +9,8 @@ from typing import Any, Dict, Optional, Protocolfrom django.conf import settingsfrom django.utils.module_loading import import_string+from core.enums import FILE_EXT_REGEX, UUID_REGEX+from .exceptions import (InvalidBucketError,InvalidFilepathError,@@ -86,7 +88,7 @@ class MinioParser:# pylint: disable=line-too-longself._filepath_regex = re.compile(- r"(?P<url_encoded_folder_path>(?:[^%]+%2F)+)?(?P<recording_id>[0-9a-fA-F\-]{36})\.(?P<extension>[a-zA-Z0-9]+)"+ rf"(?P<url_encoded_folder_path>(?:[^%]+%2F)+)?(?P<recording_id>{UUID_REGEX})\.(?P<extension>{FILE_EXT_REGEX})")@staticmethod