worker-automate-hub 0.5.787__py3-none-any.whl → 0.5.789__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.
@@ -23,6 +23,8 @@ from worker_automate_hub.tasks.task_definitions import task_definitions
23
23
  from worker_automate_hub.utils.logger import logger
24
24
  from worker_automate_hub.utils.toast import show_toast
25
25
  from worker_automate_hub.utils.util import capture_and_send_screenshot
26
+ import asyncio
27
+ from worker_automate_hub.api.rpa_fila_service import burn_queue
26
28
 
27
29
  console = Console()
28
30
 
@@ -52,6 +54,15 @@ async def perform_task(task: RpaProcessoEntradaDTO):
52
54
  historico: RpaHistorico = await create_store_historico(
53
55
  task, processo, RpaHistoricoStatusEnum.Processando
54
56
  )
57
+ i = 0
58
+ while i < 10:
59
+ try:
60
+ await burn_queue(task.uuidFila)
61
+ break
62
+ except:
63
+ i += 1
64
+ await asyncio.sleep(5)
65
+ pass
55
66
  try:
56
67
  if task_uuid in task_definitions:
57
68
  # Executar a task
@@ -54,17 +54,9 @@ 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
- i = 0
58
- while i < 10:
59
- try:
60
- await burn_queue(task.uuidFila)
61
- break
62
- except:
63
- i += 1
64
- await asyncio.sleep(5)
65
- pass
66
57
  logger.info(f"Executando a task: {task.nomProcesso}")
67
58
  await perform_task(task)
59
+
68
60
  else:
69
61
  log_message = f"O processo [{task.nomProcesso}] não existe no Worker [{worker_config['NOME_ROBO']}] e foi removido da fila."
70
62
  console.print(f"\n{log_message}\n", style="yellow")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: worker-automate-hub
3
- Version: 0.5.787
3
+ Version: 0.5.789
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
@@ -92,7 +92,7 @@ worker_automate_hub/tasks/jobs/playground.py,sha256=7vWDg9DwToHwGJ6_XOa8TQ6LmfRV
92
92
  worker_automate_hub/tasks/jobs/sped_fiscal.py,sha256=Zsq-IwKxA0b2tikO6Rri4WXVj10jK-Jd0-gxk8yVBH0,31064
93
93
  worker_automate_hub/tasks/jobs/transferencias.py,sha256=5TIktufkvUPnVTR2gf7GFQJ5KQP6PWnmoWiE08WiVDQ,46191
94
94
  worker_automate_hub/tasks/task_definitions.py,sha256=cTvHi6A4ZWhUvGk_A_TqW3AHHSr4risha9IREL4RcnE,12654
95
- worker_automate_hub/tasks/task_executor.py,sha256=9dmLUlMpJOI7FhbaFE593TcWnDxBvuXbGVecs1aaJxE,5728
95
+ worker_automate_hub/tasks/task_executor.py,sha256=F5ngJLGz7vbUrX-batUlt3FFwiCE8denFmtTTLaE77I,6044
96
96
  worker_automate_hub/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
97
97
  worker_automate_hub/utils/env.py,sha256=TacQjGRO7PUNpttrhTAc5Gnegaiysl2Knsv1P8qfkfs,57
98
98
  worker_automate_hub/utils/get_creds_gworkspace.py,sha256=ZJ0IIEjM4IXIV9rwfbOZ1V1wiaMoJAGZeSy0D37sYdU,2212
@@ -101,8 +101,8 @@ worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg
101
101
  worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
102
102
  worker_automate_hub/utils/util.py,sha256=t_RvTtBdIx6SVR4ulX2eNf5Lvz9WSWukVeqQsC7DmnM,210067
103
103
  worker_automate_hub/utils/utils_nfe_entrada.py,sha256=F7jk95LpDwl5WfaQXahCA5yDdnySnWdctDqczHXwGqE,38195
104
- worker_automate_hub/worker.py,sha256=uhZ3f-iaQ1i8cANbljp50vkYl-Xm0_sHtjwwF_2y72o,7191
105
- worker_automate_hub-0.5.787.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
106
- worker_automate_hub-0.5.787.dist-info/METADATA,sha256=5KL3M-_FDtn6o8-6ZTCC7ANWdR0gjIvVfRaa8IUaIuA,3100
107
- worker_automate_hub-0.5.787.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
108
- worker_automate_hub-0.5.787.dist-info/RECORD,,
104
+ worker_automate_hub/worker.py,sha256=zEnYUrm5kY2cHbbee15QJkwkx4euD2SB2zRvUIbjS90,6850
105
+ worker_automate_hub-0.5.789.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
106
+ worker_automate_hub-0.5.789.dist-info/METADATA,sha256=HaQMXVdHsph8kakUXOug1NFD38Sm3mIAvN1YvoPO23M,3100
107
+ worker_automate_hub-0.5.789.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
108
+ worker_automate_hub-0.5.789.dist-info/RECORD,,