Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] br_cgu_cartao_pagamento #907

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pipelines/utils/crawler_cgu/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions pipelines/utils/crawler_cgu/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pipelines/utils/crawler_cgu/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
Loading