LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
[MISC] Move Redis clients to unstract-core for better code organization (#1613)
Chandrasekharan M7d1a01b6053c
diff --git a/unstract/core/src/unstract/core/cache/__init__.py b/unstract/core/src/unstract/core/cache/__init__.pynew file mode 100644index 000000000..f13c7c536--- /dev/null+++ b/unstract/core/src/unstract/core/cache/__init__.py@@ -0,0 +1,9 @@+"""Redis Cache Clients for Unstract.++This module provides Redis client implementations for caching and queue operations.+"""++from .redis_client import RedisClient+from .redis_queue_client import RedisQueueClient++__all__ = ["RedisClient", "RedisQueueClient"]diff --git a/workers/shared/cache/redis_client.py b/unstract/core/src/unstract/core/cache/redis_client.pysimilarity index 100%rename from workers/shared/cache/redis_client.pyrename to unstract/core/src/unstract/core/cache/redis_client.pydiff --git a/workers/shared/cache/redis_queue_client.py b/unstract/core/src/unstract/core/cache/redis_queue_client.pysimilarity index 98%rename from workers/shared/cache/redis_queue_client.pyrename to unstract/core/src/unstract/core/cache/redis_queue_client.pyindex 026cc9397..0a9362bc4 100644--- a/workers/shared/cache/redis_queue_client.py+++ b/unstract/core/src/unstract/core/cache/redis_queue_client.py@@ -7,7 +7,7 @@ Inherits from RedisClient for basic Redis functionality.import loggingfrom typing import Any-from .redis_client import RedisClient+from unstract.core.cache.redis_client import RedisClientlogger = logging.getLogger(__name__)diff --git a/workers/log_consumer/process_log_history.py b/workers/log_consumer/process_log_history.pyindex fb6ece406..a941bb060 100755--- a/workers/log_consumer/process_log_history.py+++ b/workers/log_consumer/process_log_history.py@@ -17,7 +17,8 @@ import osimport sysimport httpx-from shared.cache.redis_queue_client import RedisQueueClient++from unstract.core.cache.redis_queue_client import RedisQueueClientlogger = logging.getLogger(__name__)diff --git a/workers/log_consumer/tasks.py b/workers/log_consumer/tasks.pyindex 93c44398a..eeae05f47 100644--- a/workers/log_consumer/tasks.py+++ b/workers/log_consumer/tasks.py@@ -8,11 +8,11 @@ from typing import Anyimport socketiofrom celery import shared_task-from shared.cache.redis_queue_client import RedisQueueClientfrom shared.infrastructure.config import WorkerConfigfrom shared.infrastructure.logging import WorkerLoggerfrom shared.utils.api_client_singleton import get_singleton_api_client+from unstract.core.cache.redis_queue_client import RedisQueueClientfrom unstract.core.constants import LogEventArgument, LogProcessingTaskfrom unstract.core.log_utils import store_execution_logdiff --git a/workers/shared/cache/cache_backends.py b/workers/shared/cache/cache_backends.pyindex 695ba7665..24363801a 100644--- a/workers/shared/cache/cache_backends.py+++ b/workers/shared/cache/cache_backends.py@@ -11,7 +11,7 @@ from abc import ABC, abstractmethodfrom datetime import UTC, datetimefrom typing import Any-from .redis_client import RedisClient+from unstract.core.cache.redis_client import RedisClientlogger = logging.getLogger(__name__)