worker-automate-hub 0.5.788__py3-none-any.whl → 0.5.790__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.
Potentially problematic release.
This version of worker-automate-hub might be problematic. Click here for more details.
- worker_automate_hub/tasks/task_executor.py +11 -0
- worker_automate_hub/utils/util.py +25 -21
- worker_automate_hub/worker.py +1 -9
- {worker_automate_hub-0.5.788.dist-info → worker_automate_hub-0.5.790.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.5.788.dist-info → worker_automate_hub-0.5.790.dist-info}/RECORD +7 -7
- {worker_automate_hub-0.5.788.dist-info → worker_automate_hub-0.5.790.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.788.dist-info → worker_automate_hub-0.5.790.dist-info}/entry_points.txt +0 -0
|
@@ -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
|
|
@@ -890,27 +890,31 @@ async def send_to_webhook(
|
|
|
890
890
|
"valor_nota": valor_nota,
|
|
891
891
|
}
|
|
892
892
|
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
async with
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
893
|
+
i = 0
|
|
894
|
+
while i < 5:
|
|
895
|
+
try:
|
|
896
|
+
|
|
897
|
+
async with aiohttp.ClientSession(
|
|
898
|
+
connector=aiohttp.TCPConnector(verify_ssl=True)
|
|
899
|
+
) as session:
|
|
900
|
+
async with session.post(f"{urlSimplifica}", data=data) as response:
|
|
901
|
+
if response.status != 200:
|
|
902
|
+
raise Exception(f"Erro ao enviar notificacao: {response.text()}")
|
|
903
|
+
|
|
904
|
+
data = await response.text()
|
|
905
|
+
log_msg = f"\nSucesso ao enviar {data}\n para o webhook"
|
|
906
|
+
console.print(
|
|
907
|
+
log_msg,
|
|
908
|
+
style="bold green",
|
|
909
|
+
)
|
|
910
|
+
logger.info(log_msg)
|
|
911
|
+
break
|
|
912
|
+
except Exception as e:
|
|
913
|
+
err_msg = f"Erro ao comunicar com endpoint do webhoook: {e}"
|
|
914
|
+
console.print(f"\n{err_msg}\n", style="bold red")
|
|
915
|
+
logger.info(err_msg)
|
|
916
|
+
i += 1
|
|
917
|
+
await worker_sleep(3)
|
|
914
918
|
|
|
915
919
|
def add_start_on_boot_to_registry():
|
|
916
920
|
import winreg as reg
|
worker_automate_hub/worker.py
CHANGED
|
@@ -56,15 +56,7 @@ async def check_and_execute_tasks(stop_event: threading.Event):
|
|
|
56
56
|
if processo_existe:
|
|
57
57
|
logger.info(f"Executando a task: {task.nomProcesso}")
|
|
58
58
|
await perform_task(task)
|
|
59
|
-
|
|
60
|
-
while i < 10:
|
|
61
|
-
try:
|
|
62
|
-
await burn_queue(task.uuidFila)
|
|
63
|
-
break
|
|
64
|
-
except:
|
|
65
|
-
i += 1
|
|
66
|
-
await asyncio.sleep(5)
|
|
67
|
-
pass
|
|
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")
|
|
@@ -92,17 +92,17 @@ 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=
|
|
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
|
|
99
99
|
worker_automate_hub/utils/logger.py,sha256=FYV9fg0_RAYJF_ZOCJEbqQAiCXlXk2gMpvUU1rzT_xs,671
|
|
100
100
|
worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg3Ft68,1162
|
|
101
101
|
worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
|
|
102
|
-
worker_automate_hub/utils/util.py,sha256=
|
|
102
|
+
worker_automate_hub/utils/util.py,sha256=28-CLCLbkIIpffM082X4BBUlANcqdrzw2MiuW8o9D5U,210256
|
|
103
103
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=F7jk95LpDwl5WfaQXahCA5yDdnySnWdctDqczHXwGqE,38195
|
|
104
|
-
worker_automate_hub/worker.py,sha256=
|
|
105
|
-
worker_automate_hub-0.5.
|
|
106
|
-
worker_automate_hub-0.5.
|
|
107
|
-
worker_automate_hub-0.5.
|
|
108
|
-
worker_automate_hub-0.5.
|
|
104
|
+
worker_automate_hub/worker.py,sha256=zEnYUrm5kY2cHbbee15QJkwkx4euD2SB2zRvUIbjS90,6850
|
|
105
|
+
worker_automate_hub-0.5.790.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
|
106
|
+
worker_automate_hub-0.5.790.dist-info/METADATA,sha256=qPkTfaIPgPzNfUCw_Z6ZjptmSPnJBem_kCRkdRqXPZ8,3100
|
|
107
|
+
worker_automate_hub-0.5.790.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
|
108
|
+
worker_automate_hub-0.5.790.dist-info/RECORD,,
|
|
File without changes
|
{worker_automate_hub-0.5.788.dist-info → worker_automate_hub-0.5.790.dist-info}/entry_points.txt
RENAMED
|
File without changes
|