Skip to content

Commit

Permalink
Merge branch 'master' into staging/add-captura-retorno-cct
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] committed May 28, 2024
2 parents 5bd0b13 + 2fa2060 commit b82c636
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions pipelines/rj_smtr/veiculo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog - veiculo

## [1.0.1] - 2024-05-28

### Adicionado

- Adiciona retry a task `get_raw_ftp` para mitigar as falhas na captura (https://github.com/prefeitura-rio/pipelines/pull/694)

## [1.0.0] - 2024-04-25

### Alterado
Expand Down
7 changes: 5 additions & 2 deletions pipelines/rj_smtr/veiculo/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import traceback
import zipfile
import io
from datetime import datetime
from datetime import datetime, timedelta
import pandas as pd
import numpy as np
from prefect import task
Expand Down Expand Up @@ -246,7 +246,10 @@ def pre_treatment_sppo_infracao(status: dict, timestamp: datetime):
return {"data": data, "error": error}


@task
@task(
max_retries=constants.MAX_RETRIES.value,
retry_delay=timedelta(seconds=constants.RETRY_DELAY.value),
)
def get_raw_ftp(
ftp_path: str,
filetype: str,
Expand Down

0 comments on commit b82c636

Please sign in to comment.