Skip to content

Commit

Permalink
[HOTFIX] Altera host Redis (#282)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
pixuimpou and mergify[bot] authored Oct 22, 2024
1 parent b41b0e7 commit 76ac593
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pipelines/treatment/templates/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 76ac593

Please sign in to comment.