diff --git a/pipelines/utils/crawler_cgu/flows.py b/pipelines/utils/crawler_cgu/flows.py index e7d9c426e..d5a09c638 100644 --- a/pipelines/utils/crawler_cgu/flows.py +++ b/pipelines/utils/crawler_cgu/flows.py @@ -28,7 +28,7 @@ with Flow( - name="CGU - Cartão de Pagamento" + name="CGU - Cartão de Pagamento", code_owners=["trick"] ) as flow_cgu_cartao_pagamento: dataset_id = Parameter("dataset_id", default='br_cgu_cartao_pagamento', required=True) @@ -222,7 +222,7 @@ # ! ================================== CGU - Licitacao e Contrato ===================================== -with Flow(name="CGU - Licitacão e Contrato") as flow_cgu_licitacao_contrato: +with Flow(name="CGU - Licitacão e Contrato", code_owners=["trick"]) as flow_cgu_licitacao_contrato: dataset_id = Parameter( "dataset_id", default="br_cgu_licitacao_contrato", required=True diff --git a/pipelines/utils/crawler_cgu/tasks.py b/pipelines/utils/crawler_cgu/tasks.py index 22908242a..bec196b99 100644 --- a/pipelines/utils/crawler_cgu/tasks.py +++ b/pipelines/utils/crawler_cgu/tasks.py @@ -105,7 +105,9 @@ def get_current_date_and_download_file(table_id : str, year = next_date_in_api.year, month = next_date_in_api.month, relative_month=relative_month)) + log(f"Max date: {max_date}") + date = datetime.strptime(max_date, '%Y-%m-%d') return date diff --git a/pipelines/utils/crawler_cgu/utils.py b/pipelines/utils/crawler_cgu/utils.py index f52465b42..1746b0022 100644 --- a/pipelines/utils/crawler_cgu/utils.py +++ b/pipelines/utils/crawler_cgu/utils.py @@ -110,7 +110,7 @@ def download_file(dataset_id: str, table_id: str, year: int, month: int, relativ str: The last date in the API if the URL is not found. """ - if dataset_id in ["br_cgu_cartao_pagamento" and "br_cgu_licitacao_contrato"]: + if dataset_id in ["br_cgu_cartao_pagamento", "br_cgu_licitacao_contrato"]: if dataset_id == "br_cgu_cartao_pagamento": value_constants = constants.TABELA.value[table_id] # ! CGU - Cartão de Pagamento elif dataset_id == "br_cgu_licitacao_contrato":