ytrtrt
This commit is contained in:
@@ -38,11 +38,6 @@ class ConfigEnvio:
|
||||
ia_mode: bool = False
|
||||
|
||||
|
||||
def _detectar_ia_mode(arquivo: str) -> bool:
|
||||
nome = arquivo.strip().lower()
|
||||
return nome == "ordens12.json" or nome.startswith("ia_")
|
||||
|
||||
|
||||
def carregar_config_envio(numero: int) -> ConfigEnvio:
|
||||
prefixo = f"ENVIAR{numero}_"
|
||||
ativo_raw = os.getenv(f"{prefixo}ATIVO", "s").strip().lower()
|
||||
@@ -52,7 +47,8 @@ def carregar_config_envio(numero: int) -> ConfigEnvio:
|
||||
quantidade = int(os.getenv(f"{prefixo}QUANTIDADE_ORDENS", "0"))
|
||||
hora_inicio = os.getenv(f"{prefixo}HORA_INICIO", "00:00").strip()
|
||||
hora_fim = os.getenv(f"{prefixo}HORA_FIM", "23:59").strip()
|
||||
ia_mode = _detectar_ia_mode(arquivo)
|
||||
ia_raw = os.getenv(f"{prefixo}IA", "n").strip().lower()
|
||||
ia_mode = ia_raw == "s"
|
||||
return ConfigEnvio(
|
||||
numero=numero,
|
||||
ativo=ativo,
|
||||
|
||||
Reference in New Issue
Block a user