worker-automate-hub 0.5.693__py3-none-any.whl → 0.5.694__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -557,9 +557,23 @@ async def entrada_de_notas_16(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
557
557
 
558
558
  try:
559
559
  console.print("Verificando itens não localizados ou NCM...\n")
560
- itens_by_supplier = await is_window_open_by_class("TFrmAguarde", "TMessageForm")
560
+
561
+ max_tentativas = 3
562
+ tentativa = 0
563
+ itens_by_supplier = {"IsOpened": False}
564
+
565
+ while tentativa < max_tentativas:
566
+ itens_by_supplier = await is_window_open_by_class("TFrmAguarde", "TMessageForm")
567
+
568
+ if itens_by_supplier["IsOpened"]:
569
+ break # janela foi detectada
561
570
 
562
- if itens_by_supplier["IsOpened"] == True:
571
+ tentativa += 1
572
+ if tentativa < max_tentativas:
573
+ console.print(f"Tentativa {tentativa} falhou. Aguardando 10 segundos antes de tentar novamente...")
574
+ await asyncio.sleep(10)
575
+
576
+ if itens_by_supplier["IsOpened"]:
563
577
  itens_by_supplier_work = await itens_not_found_supplier(nota.get("nfe"))
564
578
 
565
579
  if not itens_by_supplier_work.sucesso:
@@ -573,6 +587,7 @@ async def entrada_de_notas_16(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
573
587
  tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
574
588
  )
575
589
 
590
+
576
591
  await worker_sleep(3)
577
592
 
578
593
  console.print("Navegando pela Janela de Nota Fiscal de Entrada...\n")
@@ -869,4 +884,3 @@ async def entrada_de_notas_16(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
869
884
  status=RpaHistoricoStatusEnum.Falha,
870
885
  tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
871
886
  )
872
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: worker-automate-hub
3
- Version: 0.5.693
3
+ Version: 0.5.694
4
4
  Summary: Worker Automate HUB é uma aplicação para automatizar rotinas de RPA nos ambientes Argenta.
5
5
  Author: Joel Paim
6
6
  Requires-Python: >=3.12,<4.0
@@ -54,7 +54,7 @@ worker_automate_hub/tasks/jobs/ecac_federal.py,sha256=VFOrbMuMHL3ac1sJ-z-N1p1WYt
54
54
  worker_automate_hub/tasks/jobs/entrada_cte_1353.py,sha256=knwPbjZZsnvHKurs7O7gv7bFpQIAmv4qPB1rZa3zBsY,12102
55
55
  worker_automate_hub/tasks/jobs/entrada_cte_333.py,sha256=FvpU_bsdPB2ANQ_i63Jlkdo5yZM4zJdr2mm41KTrJtE,13285
56
56
  worker_automate_hub/tasks/jobs/entrada_de_notas_15.py,sha256=Mfisb9B79lhSc5RaqbnRslI8zeUgRBWEWbwQWkzNZOs,29763
57
- worker_automate_hub/tasks/jobs/entrada_de_notas_16.py,sha256=AFpFu2HezsRJKMrYrPYTHUJby0NFch_zlHqf1X-Fe7A,37101
57
+ worker_automate_hub/tasks/jobs/entrada_de_notas_16.py,sha256=I603L0fo_zuSGTm6RxQTtrBEwo3wXjKZ5jZxnCB9cCA,37622
58
58
  worker_automate_hub/tasks/jobs/entrada_de_notas_207.py,sha256=A5HM2Eh2bGZueVefnQL9KiCWW95j8zX1v2MslgbDcUE,36871
59
59
  worker_automate_hub/tasks/jobs/entrada_de_notas_32.py,sha256=lku233FqwOknXF14HHC6fZ75WubE69Jp32bAUhKPtGQ,34575
60
60
  worker_automate_hub/tasks/jobs/entrada_de_notas_33.py,sha256=ODp82BkWaiF40t6uZLJYxG2nGGnvDyeQBHhkkh9ZgPI,35994
@@ -98,7 +98,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
98
98
  worker_automate_hub/utils/util.py,sha256=xA13nQqZglwkvfAKH18Unv4UoZUyvL58CacSrzUpYTw,206352
99
99
  worker_automate_hub/utils/utils_nfe_entrada.py,sha256=L_z1Aps6BFWl-6_Ibm45vDid1S4kFDz5O78N2uO1Rq0,36458
100
100
  worker_automate_hub/worker.py,sha256=axdrr1xLTjWEyWfcyH3OCSpPTsyzck_fL_0u1DBLjvw,6525
101
- worker_automate_hub-0.5.693.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
102
- worker_automate_hub-0.5.693.dist-info/METADATA,sha256=py-AYClpMNV0PZzhg3mqWOas1eu-duRWj1C9-RZc3lQ,3049
103
- worker_automate_hub-0.5.693.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
104
- worker_automate_hub-0.5.693.dist-info/RECORD,,
101
+ worker_automate_hub-0.5.694.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
102
+ worker_automate_hub-0.5.694.dist-info/METADATA,sha256=1PnTnNV7Ae0WlxWhx24qPVRFvWW4Qs_LMURacagZN2I,3049
103
+ worker_automate_hub-0.5.694.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
104
+ worker_automate_hub-0.5.694.dist-info/RECORD,,