Skip to content

Commit

Permalink
corrige arquivos com erro
Browse files Browse the repository at this point in the history
  • Loading branch information
pixuimpou committed Jul 25, 2024
1 parent f958f57 commit e35772d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions pipelines/janitor/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# from typing import Dict, List
import traceback
from datetime import datetime
from typing import Dict, List

import requests
from prefect import task
Expand All @@ -11,6 +10,8 @@
from pipelines.utils.secret import get_secret
from pipelines.utils.utils import log

# from typing import Dict, List


@task
def query_active_flow_names(prefix="%SMTR%", prefect_client=None, prefect_project="production"):
Expand Down Expand Up @@ -54,7 +55,8 @@ def query_not_active_flows(flows, prefect_client=None, prefect_project="producti
flow_name, last_version = flows
now = datetime.now().isoformat()
query = """
query($flow_name: String, $last_version: Int, $now: timestamptz!, $offset: Int, $project_name:String){
query(\
$flow_name: String, $last_version: Int, $now: timestamptz!, $offset: Int, $project_name:String){
flow(
where:{
name: {_eq:$flow_name},
Expand Down
6 changes: 4 additions & 2 deletions pipelines/migration/br_rj_riodejaneiro_gtfs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def normalizar_horario(horario):
Normalizes the given time string.
If the time string contains the word "day", it splits the string into days and time.
It converts the days, hours, minutes, and seconds into total hours and returns the normalized time string.
It converts the days, hours, minutes, and seconds into total hours and returns
the normalized time string.
If the time string does not contain the word "day", it returns the time string as is.
Expand Down Expand Up @@ -192,7 +193,8 @@ def processa_ordem_servico(
regular_sheet_index (int, optional): The index of the regular sheet. Defaults to 0.
Raises:
Exception: If there are more than 2 tabs in the file or if there are missing or duplicated columns in the order of service data.
Exception: If there are more than 2 tabs in the file or if there are missing or
duplicated columns in the order of service data.
Exception: If the validation of 'km_test' and 'km_dia_util' fails.
Returns:
Expand Down

0 comments on commit e35772d

Please sign in to comment.