worker-automate-hub 0.5.732__py3-none-any.whl → 0.5.734__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.
@@ -855,9 +855,10 @@ async def entrada_de_notas_16(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
855
855
  )
856
856
  console.print("\nVerifica se a nota ja foi lançada...")
857
857
  nf_chave_acesso = int(nota.get("nfe"))
858
- status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
859
- nf_imported = await check_nota_importada(nota.get("nfe"))
860
- if nf_imported.sucesso == True:
858
+ try:
859
+ nf_imported = await check_nota_importada(nota.get("nfe"))
860
+ except:
861
+ pass
861
862
  await worker_sleep(12)
862
863
  console.print("\nVerifica se a nota ja foi lançada...")
863
864
  status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
@@ -876,15 +877,6 @@ async def entrada_de_notas_16(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
876
877
  status=RpaHistoricoStatusEnum.Falha,
877
878
  tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)]
878
879
  )
879
- else:
880
- console.print("Erro ao lançar nota", style="bold red")
881
- return RpaRetornoProcessoDTO(
882
- sucesso=False,
883
- retorno=f"Erro ao lançar nota, erro: {nf_imported.retorno}",
884
- status=RpaHistoricoStatusEnum.Falha,
885
- tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
886
- )
887
-
888
880
  except Exception as ex:
889
881
  observacao = f"Erro Processo Entrada de Notas: {str(ex)}"
890
882
  logger.error(observacao)
@@ -881,26 +881,12 @@ async def entrada_de_notas_7139(task: RpaProcessoEntradaDTO) -> RpaRetornoProces
881
881
 
882
882
  except Exception as error:
883
883
  nf_imported = await check_nota_importada(nota.get("nfe"))
884
- if nf_imported.sucesso == True:
885
- console.print("\nVerifica se a nota ja foi lançada...")
886
- status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
887
- if status_nf_emsys.get("status") == "Lançada":
888
- console.print(
889
- "\nNota lançada com sucesso, processo finalizado...",
890
- style="bold green",
891
- )
892
- return RpaRetornoProcessoDTO(
893
- sucesso=True,
894
- retorno="Nota Lançada com sucesso!",
895
- status=RpaHistoricoStatusEnum.Sucesso,
896
- )
897
- else:
898
- return RpaRetornoProcessoDTO(
899
- sucesso=False,
900
- retorno=f"Erro inesperado: {str(error)}",
901
- status=RpaHistoricoStatusEnum.Falha,
902
- tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
903
- )
884
+ return RpaRetornoProcessoDTO(
885
+ sucesso=False,
886
+ retorno=f"Erro inesperado: {str(error)}",
887
+ status=RpaHistoricoStatusEnum.Falha,
888
+ tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
889
+ )
904
890
 
905
891
  except Exception as ex:
906
892
  observacao = f"Erro Processo Entrada de Notas: {str(ex)}"
@@ -54,7 +54,15 @@ async def check_and_execute_tasks(stop_event: threading.Event):
54
54
  if task is not None:
55
55
  processo_existe = await is_uuid_in_tasks(task.uuidProcesso)
56
56
  if processo_existe:
57
- await burn_queue(task.uuidFila)
57
+ i = 0
58
+ while i < 5:
59
+ try:
60
+ await burn_queue(task.uuidFila)
61
+ break
62
+ except:
63
+ i += 1
64
+ await asyncio.sleep(2)
65
+ pass
58
66
  logger.info(f"Executando a task: {task.nomProcesso}")
59
67
  await perform_task(task)
60
68
  else:
@@ -75,7 +83,15 @@ async def check_and_execute_tasks(stop_event: threading.Event):
75
83
  ),
76
84
  )
77
85
  # Libera o registro da fila e informa o chat
78
- await burn_queue(task.uuidFila)
86
+ i = 0
87
+ while i < 5:
88
+ try:
89
+ await burn_queue(task.uuidFila)
90
+ break
91
+ except:
92
+ i += 1
93
+ await asyncio.sleep(2)
94
+ pass
79
95
  await send_gchat_message(log_message)
80
96
  except Exception as e:
81
97
  console.print(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: worker-automate-hub
3
- Version: 0.5.732
3
+ Version: 0.5.734
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=k0sRpKOCtyld1mPEu0n6HUncZYcX8wAsKAIYKGVacSs,30487
57
- worker_automate_hub/tasks/jobs/entrada_de_notas_16.py,sha256=3ZtqMIhpRFMji1aKJBwvnQ9nR3emOt1QDHwwM9xfiIw,38335
57
+ worker_automate_hub/tasks/jobs/entrada_de_notas_16.py,sha256=EfMEtlfe7iM_lWcML1SJAYHB67rAuWKWQT-kbHqBeXQ,37888
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
@@ -64,7 +64,7 @@ worker_automate_hub/tasks/jobs/entrada_de_notas_39.py,sha256=0SdsXZzIZoLdEzW9HXy
64
64
  worker_automate_hub/tasks/jobs/entrada_de_notas_500.py,sha256=WBsCRbH7ANiCjEn0aEDc5AqGf6grEFhxyBoAIh3zJ40,44160
65
65
  worker_automate_hub/tasks/jobs/entrada_de_notas_503.py,sha256=q4_PeGrMqMs1EzBp7hGtpAuteqmvzDg-Q796pTlF8KI,47395
66
66
  worker_automate_hub/tasks/jobs/entrada_de_notas_505.py,sha256=xXeNipdXTSll8yAtAmN7v0sjN3oMlWU4THu30mKDddc,30339
67
- worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=FJkXdqKTLax6kSGaOmO1xHHycPjLGKNtnBNS7hZCo8E,38677
67
+ worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=7POfKc7nisc8-ysgqazrK8kT7kmFIq8irGwCMixPAE0,37948
68
68
  worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=ZYE2YmQJ9954Uuc9fiSykGi0ws_NPXs8ex244y20P44,64642
69
69
  worker_automate_hub/tasks/jobs/entrada_de_notas_9000.py,sha256=cDMzDGcylhg9pwtCPmZ82YItPS05PWcPtfeeC2WGrpA,65507
70
70
  worker_automate_hub/tasks/jobs/exemplo_processo.py,sha256=nV0iLoip2FH2-FhLmhX3nPqsfl_MPufZ3E5Q5krJvdc,3544
@@ -97,8 +97,8 @@ worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg
97
97
  worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
98
98
  worker_automate_hub/utils/util.py,sha256=C5sEoG8x7H5zaUM_bqSvVrdxWonSJcfBF_kU9kn7PA0,207508
99
99
  worker_automate_hub/utils/utils_nfe_entrada.py,sha256=qS_REFGudeZhoOkamUst8WzW1XyMGws5GehrMr5XZTM,38085
100
- worker_automate_hub/worker.py,sha256=4s67gspi7Bdj862zYXq99vQgXVE9CSyyU9Nzd0DqgzU,6580
101
- worker_automate_hub-0.5.732.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
102
- worker_automate_hub-0.5.732.dist-info/METADATA,sha256=3wPlkwOqQUtHPPwrNgbawSe3dRR1woV9XTUoWBbHJRc,3049
103
- worker_automate_hub-0.5.732.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
104
- worker_automate_hub-0.5.732.dist-info/RECORD,,
100
+ worker_automate_hub/worker.py,sha256=TKTEm6vAf5p_Y_GwvIac7KRUQjlfdHTrkR73NbkjOvk,7190
101
+ worker_automate_hub-0.5.734.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
102
+ worker_automate_hub-0.5.734.dist-info/METADATA,sha256=xHvW0LQf3u4qU-SSe_5s5zgR4dHZ0prd-dh8TRNNC0U,3049
103
+ worker_automate_hub-0.5.734.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
104
+ worker_automate_hub-0.5.734.dist-info/RECORD,,