[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 <hari@zipstack.com> 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 <hari@zipstack.com> 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>
This commit is contained in:
committed by
GitHub
parent
1897ee621e
commit
38e5d372a2
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user