From 76ac593abfc676a1f0d17c68624c11a464bb54c9 Mon Sep 17 00:00:00 2001 From: Rafael Carvalho Pinheiro <74972217+pixuimpou@users.noreply.github.com> Date: Tue, 22 Oct 2024 14:59:53 -0300 Subject: [PATCH] [HOTFIX] Altera host Redis (#282) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * mudanças flow generico * excluir flow modelo antigo * cria captura rioonibus * altera flow generico de captura * altera flow generico * ajuste captura * inicia alterações materializacao * alterações datetime * materialização viagem_informada * add fornecedor * refatoração flows novos * add schema * corrige descricao * add changelog * altera projetos * add rioonibus e monitoramento * muda captura para d-2 * remove print * altera nome da coluna fornecedor para fonte_gps * altera nome da coluna forncedor para fonte_gps * corrige timestamps iniciais * corrigir initial_datetime * altera timezone do schedule * altera label agent * import datetime * remove comentario * remove localhost redis --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- pipelines/treatment/templates/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/treatment/templates/utils.py b/pipelines/treatment/templates/utils.py index 1eca2c80c..8058fcffd 100644 --- a/pipelines/treatment/templates/utils.py +++ b/pipelines/treatment/templates/utils.py @@ -60,7 +60,7 @@ def get_last_materialized_datetime(self, env: str) -> datetime: datetime: a data vinda do Redis """ redis_key = f"{env}.selector_{self.name}" - redis_client = get_redis_client(host="localhost") + redis_client = get_redis_client() content = redis_client.get(redis_key) last_datetime = ( self.initial_datetime @@ -124,7 +124,7 @@ def set_redis_materialized_datetime(self, env: str, timestamp: datetime): value = timestamp.strftime(constants.MATERIALIZATION_LAST_RUN_PATTERN.value) redis_key = f"{env}.selector_{self.name}" log(f"Saving timestamp {value} on key: {redis_key}") - redis_client = get_redis_client(host="localhost") + redis_client = get_redis_client() content = redis_client.get(redis_key) if not content: content = {constants.REDIS_LAST_MATERIALIZATION_TS_KEY.value: value}