worker-automate-hub 0.5.708__py3-none-any.whl → 0.5.709__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.
@@ -279,8 +279,15 @@ async def exportacao_docs_portal_b2b(task: RpaProcessoEntradaDTO) -> RpaRetornoP
279
279
  while not sucesso:
280
280
  desktop = Desktop(backend="uia")
281
281
  try:
282
- # Tenta localizar a janela com o título que contém "Aguarde"
282
+ #Tenta localizar janela de erro, se localizar retorna erro para o rpa
283
+ try:
284
+ window_erro = desktop.window(title_re="Erro")
285
+ if window_erro.exists():
286
+ break
287
+ except:
288
+ console.print("Sem janela de Erro encontrada")
283
289
  window = desktop.window(title_re="Aguarde...")
290
+ # Tenta localizar a janela com o título que contém "Aguarde"
284
291
  # Se a janela existe, continua monitorando
285
292
  if window.exists():
286
293
  console.print(f"Janela 'Aguarde...' ainda aberta", style="bold yellow")
@@ -288,6 +295,9 @@ async def exportacao_docs_portal_b2b(task: RpaProcessoEntradaDTO) -> RpaRetornoP
288
295
  await worker_sleep(30)
289
296
  continue
290
297
  else:
298
+ window_erro = desktop.window(title_re="Erro")
299
+ if window_erro.exists():
300
+ break
291
301
  try:
292
302
  desktop_second = Desktop(backend="uia")
293
303
  window_aguarde = desktop_second.window(title_re="Aguarde...")
@@ -311,6 +321,7 @@ async def exportacao_docs_portal_b2b(task: RpaProcessoEntradaDTO) -> RpaRetornoP
311
321
  await capture_and_send_screenshot(task.historico_id, "PortalB2B_Exportacao_Documentos")
312
322
  return RpaRetornoProcessoDTO(sucesso=True, retorno="Processo de exportação dos documentos do portal B2B finalizado", status=RpaHistoricoStatusEnum.Sucesso)
313
323
  else:
324
+ await capture_and_send_screenshot(task.historico_id, "PortalB2B_Exportacao_Documentos_erro")
314
325
  return RpaRetornoProcessoDTO(sucesso=False, retorno="Ocorreu um erro ao finalizar o processo de exportação dos documentos do portal B2B", status=RpaHistoricoStatusEnum.Falha, tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)])
315
326
  except Exception as ex:
316
327
  log_msg = f"Erro Processo Exportacao Docs Portal B2B: {str(ex)}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: worker-automate-hub
3
- Version: 0.5.708
3
+ Version: 0.5.709
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
@@ -71,7 +71,7 @@ worker_automate_hub/tasks/jobs/exemplo_processo.py,sha256=nV0iLoip2FH2-FhLmhX3nP
71
71
  worker_automate_hub/tasks/jobs/extracao_fechamento_contabil.py,sha256=6Kr5DKjKLqtFvGzyiXtt7xrQsuU898l8pQXDq9C6AX8,19567
72
72
  worker_automate_hub/tasks/jobs/extracao_fechamento_emsys.py,sha256=-T2nZUDiFrUGm_KLxJd_4qcrageDxVpWW3KAAniLFC4,21448
73
73
  worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py,sha256=UWAKCS2dbfgDlSQOBdjmVJXfD1MMuUrOi3weDgB0CAc,5718
74
- worker_automate_hub/tasks/jobs/fidc_exportacao_docs_portal_b2b.py,sha256=SOs2mORBJqHs089ApbLaPJVRXM7wWhf0e99URXqPlpQ,15020
74
+ worker_automate_hub/tasks/jobs/fidc_exportacao_docs_portal_b2b.py,sha256=tWUmYy3Zhi3JEt8AoqTsWpU-wbf5-OxhCrTOooh1WH4,15616
75
75
  worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py,sha256=zu92tRCvKPK0U6IGGF28ST-kERohJcNbys-DWk0tIco,12555
76
76
  worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py,sha256=XCbIZG1y7eTrBFF8ArVbOij_FbkFkIXNpwZusILmiVo,15701
77
77
  worker_automate_hub/tasks/jobs/fidc_retorno_cobranca.py,sha256=mmBW7KetUeRjiZkjnrxMKGX32io3YLZ8KGaY5_o7new,11891
@@ -98,7 +98,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
98
98
  worker_automate_hub/utils/util.py,sha256=X0ui4zwNvqm9jYOqL1lyfmBXUxlP6YtxIJ81WZhjaR0,206353
99
99
  worker_automate_hub/utils/utils_nfe_entrada.py,sha256=Yy4vDY5Wiw0uopy43IRm9jUgF5g1aFXMGVtG-GtH2g4,37524
100
100
  worker_automate_hub/worker.py,sha256=axdrr1xLTjWEyWfcyH3OCSpPTsyzck_fL_0u1DBLjvw,6525
101
- worker_automate_hub-0.5.708.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
102
- worker_automate_hub-0.5.708.dist-info/METADATA,sha256=aF6L6kZ9iKM_dAV7DTonyLX_TVDSUN823L15mHP55tE,3049
103
- worker_automate_hub-0.5.708.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
104
- worker_automate_hub-0.5.708.dist-info/RECORD,,
101
+ worker_automate_hub-0.5.709.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
102
+ worker_automate_hub-0.5.709.dist-info/METADATA,sha256=Oid87LLcZOUxb_y5RTiyZXT5IvRaV8kS8QqbQAKJ2JQ,3049
103
+ worker_automate_hub-0.5.709.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
104
+ worker_automate_hub-0.5.709.dist-info/RECORD,,