Skip to content

Commit

Permalink
add task retries to main tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
folhesgabriel committed Dec 5, 2024
1 parent 14806f5 commit 472d86e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pipelines/datasets/br_me_cnpj/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ def get_data_source_max_date() -> tuple[datetime,datetime]:
folder_date, today_date = data_url(url=url, headers=headers)
return folder_date, today_date

@task
@task(
max_retries=3,
retry_delay=timedelta(seconds=constants.TASK_RETRY_DELAY.value),
)
def main(tabelas:[str], folder_date:datetime, today_date:datetime)-> str:
"""
Performs the download, processing, and organization of CNPJ data.
Expand Down

0 comments on commit 472d86e

Please sign in to comment.