diff --git a/pipelines/tasks.py b/pipelines/tasks.py index 6884947f..83f9c126 100644 --- a/pipelines/tasks.py +++ b/pipelines/tasks.py @@ -43,6 +43,7 @@ ) from pipelines.utils.secret import get_secret from prefeitura_rio.pipelines_utils.dbt import run_dbt_model +from prefeitura_rio.pipelines_utils.redis_pal import get_redis_client from prefeitura_rio.pipelines_utils.infisical import inject_bd_credentials from prefeitura_rio.pipelines_utils.logging import log diff --git a/pipelines/utils/utils.py b/pipelines/utils/utils.py index 70e40ad0..8468307a 100644 --- a/pipelines/utils/utils.py +++ b/pipelines/utils/utils.py @@ -39,6 +39,7 @@ from prefeitura_rio.pipelines_utils.logging import log #TODO: add or relocate imports from prefeitura_rio.pipelines_utils.infisical import get_secret +from prefeitura_rio.pipelines_utils.redis_pal import get_redis_client # Set BD config to run on cloud # bd.config.from_file = True @@ -157,22 +158,6 @@ def get_table_min_max_value( # pylint: disable=R0913 return result.iloc[0][0] -def get_redis_client( - host: str = "redis.redis.svc.cluster.local", - port: int = 6379, - db: int = 0, # pylint: disable=C0103 - password: str = None, -) -> RedisPal: - """ - Returns a Redis client. - """ - return RedisPal( - host=host, - port=port, - db=db, - password=password, - ) - def get_last_run_timestamp(dataset_id: str, table_id: str, mode: str = "prod") -> str: """ Query redis to retrive the time for when the last materialization