From 38e5d372a202ac97e434bd07a85a23ee66ea5722 Mon Sep 17 00:00:00 2001 From: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Date: Tue, 26 Aug 2025 18:19:12 +0530 Subject: [PATCH] [MISC] Specify unsupported connectors' ID with their respective function (#1505) * misc: Avoided hardcoding redis' connector_id and caught import errors instead * Update backend/connector_processor/connector_processor.py Co-authored-by: Hari John Kuriakose Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Chandrasekharan M <117059509+chandrasekharan-zipstack@users.noreply.github.com> Co-authored-by: Hari John Kuriakose Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Gayathri <142381512+gaya3-zipstack@users.noreply.github.com> --- backend/connector_processor/connector_processor.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/connector_processor/connector_processor.py b/backend/connector_processor/connector_processor.py index 25cdd6f8..10b6374c 100644 --- a/backend/connector_processor/connector_processor.py +++ b/backend/connector_processor/connector_processor.py @@ -21,6 +21,11 @@ from unstract.connectors.enums import ConnectorMode from unstract.connectors.exceptions import ConnectorError, FSAccessDeniedError from unstract.connectors.filesystems.ucs import UnstractCloudStorage +try: + from unstract.connectors.queues.redis import RedisQueue +except ImportError: + RedisQueue = None + logger = logging.getLogger(__name__) @@ -72,9 +77,11 @@ class ConnectorProcessor: supported_connectors = [] updated_connectors = [] - # HACK: Connectors that are marked active but not supported explicitly # TODO: Remove RedisQueue from the list of connectors and use separately instead - unsupported_connectors = ["redisqueue|79e1d681-9b8b-4f6b-b972-1a6a095312f45"] + # HACK: Connectors that are marked active but not supported explicitly + unsupported_connectors = [ + connector.get_id() for connector in filter(None, [RedisQueue]) + ] if type == ConnectorKeys.INPUT: updated_connectors = fetch_connectors_by_key_value(