From cba793c38e01125f4293a2180b88e14c515acd74 Mon Sep 17 00:00:00 2001 From: Maira Date: Wed, 30 Oct 2024 16:58:39 -0300 Subject: [PATCH] time sleep 1 --- .../passo_2_match_com_equipe_e_upload_turn.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/scripts/passo_2_match_com_equipe_e_upload_turn.py b/src/scripts/passo_2_match_com_equipe_e_upload_turn.py index 6b014df..e26f386 100644 --- a/src/scripts/passo_2_match_com_equipe_e_upload_turn.py +++ b/src/scripts/passo_2_match_com_equipe_e_upload_turn.py @@ -12,10 +12,17 @@ import time import json from typing import List, Dict, Tuple -from src.bd import BigQueryClient +#from src.bd import BigQueryClient from datetime import datetime from google.cloud import bigquery +import sys +import os +sys.path.append(r"C:/impulsogov/mensageria-mvp/src") + +from bd import BigQueryClient + + tokens_municipios = [ {"municipio": "Paulo Ramos", "id_sus": "210810", "token": os.getenv('ENV_PAULORAMOS_MA')}, {"municipio": "Lago Verde", "id_sus": "210590", "token": os.getenv('ENV_LAGOVERDE_MA')}, @@ -94,9 +101,7 @@ def send_data(df, municipio_id_sus): except Exception as e: print(f"Erro ao atualizar perfil de {row.celular_tratado}: {e}") - time.sleep(3) - - + time.sleep(1) def processo_envio_turn() -> None: @@ -182,4 +187,4 @@ def processo_envio_turn() -> None: return { 'status': 'sucesso', 'mensagem': 'Dados enviados para TurnIO.' - } \ No newline at end of file + }