worker-automate-hub 0.5.13__py3-none-any.whl → 0.5.15__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.
- worker_automate_hub/api/webhook_service.py +2 -2
- worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +5 -1
- worker_automate_hub/utils/util.py +17 -2
- worker_automate_hub/worker.py +5 -0
- {worker_automate_hub-0.5.13.dist-info → worker_automate_hub-0.5.15.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.5.13.dist-info → worker_automate_hub-0.5.15.dist-info}/RECORD +8 -8
- {worker_automate_hub-0.5.13.dist-info → worker_automate_hub-0.5.15.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.13.dist-info → worker_automate_hub-0.5.15.dist-info}/entry_points.txt +0 -0
@@ -40,10 +40,10 @@ async def send_to_webhook(
|
|
40
40
|
connector=aiohttp.TCPConnector(verify_ssl=False)
|
41
41
|
) as session:
|
42
42
|
async with session.post(f"{url_retorno}", data=data) as response:
|
43
|
+
data = await response.text()
|
43
44
|
if response.status != 200:
|
44
|
-
raise Exception(f"Erro ao enviar notificacao: {
|
45
|
+
raise Exception(f"Erro ao enviar notificacao: {data}")
|
45
46
|
|
46
|
-
data = await response.text()
|
47
47
|
log_msg = f"\nSucesso ao enviar {data}\n para o webhook: {url_retorno}.\n"
|
48
48
|
console.print(
|
49
49
|
log_msg,
|
@@ -576,9 +576,13 @@ async def entrada_de_notas_500(task: RpaProcessoEntradaDTO) -> RpaRetornoProcess
|
|
576
576
|
if i <= max_try and first_nop:
|
577
577
|
console.print(f"A segunda correspondência '1152 - ENTRADAS P/ TRANSFERENCIA DE MERCADORIAS- 1.152' foi encontrada e selecionada.")
|
578
578
|
else:
|
579
|
+
if first_nop:
|
580
|
+
retorno_backoffice = f"Erro: não foi encontrada a segunda correspondência dentro do número máximo de tentativas ({max_try})."
|
581
|
+
else:
|
582
|
+
retorno_backoffice = f"Erro: não foi encontrada a primeira correspondência dentro do número máximo de tentativas ({max_try})."
|
579
583
|
return RpaRetornoProcessoDTO(
|
580
584
|
sucesso=False,
|
581
|
-
retorno=
|
585
|
+
retorno=retorno_backoffice,
|
582
586
|
status=RpaHistoricoStatusEnum.Falha,
|
583
587
|
)
|
584
588
|
|
@@ -2215,9 +2215,24 @@ async def select_documento_type(document_type: str) -> RpaRetornoProcessoDTO:
|
|
2215
2215
|
set_combobox("||List", document_type)
|
2216
2216
|
except Exception as e:
|
2217
2217
|
console.log("Não foi possivel selecionar o tipo de documento via set combobox, realizando a alteração utilizando send keys")
|
2218
|
-
combo_box_tipo_documento.
|
2219
|
-
|
2218
|
+
combo_box_tipo_documento.click()
|
2219
|
+
await worker_sleep(2)
|
2220
|
+
pyautogui.write("N")
|
2221
|
+
await worker_sleep(1)
|
2222
|
+
pyautogui.hotkey("enter")
|
2223
|
+
await worker_sleep(2)
|
2220
2224
|
|
2225
|
+
max_try = 20
|
2226
|
+
i = 0
|
2227
|
+
while i <= max_try:
|
2228
|
+
combo_box_tipo_documento = panel_TTabSheet.child_window(class_name="TDBIComboBox", found_index=1)
|
2229
|
+
document_type_selected = combo_box_tipo_documento.window_text()
|
2230
|
+
if document_type == document_type_selected:
|
2231
|
+
break
|
2232
|
+
else:
|
2233
|
+
pyautogui.press('down')
|
2234
|
+
await worker_sleep(2)
|
2235
|
+
i = i + 1
|
2221
2236
|
|
2222
2237
|
|
2223
2238
|
combo_box_tipo_documento = panel_TTabSheet.child_window(class_name="TDBIComboBox", found_index=1)
|
worker_automate_hub/worker.py
CHANGED
@@ -16,6 +16,7 @@ from worker_automate_hub.api.rpa_fila_service import burn_queue
|
|
16
16
|
from worker_automate_hub.api.rpa_historico_service import (
|
17
17
|
create_store_historico,
|
18
18
|
)
|
19
|
+
from worker_automate_hub.api.webhook_service import send_to_webhook
|
19
20
|
from worker_automate_hub.config.settings import (
|
20
21
|
load_env_config,
|
21
22
|
load_worker_config,
|
@@ -75,6 +76,10 @@ async def check_and_execute_tasks(stop_event: threading.Event):
|
|
75
76
|
except Exception as e:
|
76
77
|
console.print(f"Erro ao salvar histórico de processo não implementado: {e}", style="bold red")
|
77
78
|
await send_gchat_message(log_message)
|
79
|
+
url_retorno = task.configEntrada.get("urlRetorno", None)
|
80
|
+
|
81
|
+
if url_retorno is not None:
|
82
|
+
await send_to_webhook(url_retorno, RpaHistoricoStatusEnum.Descartado, log_message)
|
78
83
|
else:
|
79
84
|
await asyncio.sleep(5)
|
80
85
|
except Exception as e:
|
@@ -7,7 +7,7 @@ worker_automate_hub/api/helpers/api_helpers.py,sha256=SkheO2fXexeh-a4shr8Qzsz_kZ
|
|
7
7
|
worker_automate_hub/api/rdp_service.py,sha256=L7orr60FkJr6zjETtA4me8tRYCW9m1g-i5pq6AILUFo,1647
|
8
8
|
worker_automate_hub/api/rpa_fila_service.py,sha256=6RyzCvj2qODifz3cIwOg5kuUpk8cyN_yFmLV5YOJAoQ,2186
|
9
9
|
worker_automate_hub/api/rpa_historico_service.py,sha256=wQw8_k8i0S-r7qrrn4BSoztkgtiuH_bHRSEytbZebDg,9690
|
10
|
-
worker_automate_hub/api/webhook_service.py,sha256=
|
10
|
+
worker_automate_hub/api/webhook_service.py,sha256=1VgkcOF0vY3cpV7-UOgrUj0qRuK9joDCvLhJkBBT0sQ,1751
|
11
11
|
worker_automate_hub/cli.py,sha256=JB45pjPJ8_E-4xw0OjqDMcAw-tpDV0mjmvwJRTnTzY0,6862
|
12
12
|
worker_automate_hub/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
worker_automate_hub/config/settings.py,sha256=4BkIYV0C9C_tl68WNfw3aoywr1-_bRJsKysSnSRALT0,2450
|
@@ -50,7 +50,7 @@ worker_automate_hub/tasks/jobs/entrada_de_notas_33.py,sha256=ktXc_kdMhlz9cbb7Xjf
|
|
50
50
|
worker_automate_hub/tasks/jobs/entrada_de_notas_34.py,sha256=iaSmtWTWlazHDtGp22yTV5J5rHDhUCbEaCAnpU7UWyM,31808
|
51
51
|
worker_automate_hub/tasks/jobs/entrada_de_notas_36.py,sha256=vFkDcgJ9uxrMMLYdeONCMxh6_evnhgF1Sun5HEHAWa4,22716
|
52
52
|
worker_automate_hub/tasks/jobs/entrada_de_notas_39.py,sha256=t_gIpj1dh_1AZu8LdI8bXVoi-KLOdsnoZIZ4l-kpy1k,33688
|
53
|
-
worker_automate_hub/tasks/jobs/entrada_de_notas_500.py,sha256=
|
53
|
+
worker_automate_hub/tasks/jobs/entrada_de_notas_500.py,sha256=cNpqXxBhHXRdL5PhO9vRx6gE1jVzi28nZDkmewY5x9s,32516
|
54
54
|
worker_automate_hub/tasks/jobs/entrada_de_notas_505.py,sha256=jIml8gjXPdI6_x7S9VVV8IrKZRF7_PTNOMnhNmYMDTU,14490
|
55
55
|
worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=oxH2CUJj3UyhYoSxEY2hUr_6wFgZPLcHswEbApIu8VY,15558
|
56
56
|
worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=Urt_7dZNuyUkSyG9fYb2ArBXzEONXlrqWIesoXeL1EI,50984
|
@@ -70,10 +70,10 @@ worker_automate_hub/utils/get_creds_gworkspace.py,sha256=ZJ0IIEjM4IXIV9rwfbOZ1V1
|
|
70
70
|
worker_automate_hub/utils/logger.py,sha256=FYV9fg0_RAYJF_ZOCJEbqQAiCXlXk2gMpvUU1rzT_xs,671
|
71
71
|
worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg3Ft68,1162
|
72
72
|
worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
|
73
|
-
worker_automate_hub/utils/util.py,sha256=
|
73
|
+
worker_automate_hub/utils/util.py,sha256=s_rrJYYWgMYJylaySnr-7ejKEUFz8lw_U1NQMD1Z0hE,126499
|
74
74
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=p5r_L5k7gqCBvV8v6dbLFM6INKiSpGc4Gegid0_YAh4,29017
|
75
|
-
worker_automate_hub/worker.py,sha256=
|
76
|
-
worker_automate_hub-0.5.
|
77
|
-
worker_automate_hub-0.5.
|
78
|
-
worker_automate_hub-0.5.
|
79
|
-
worker_automate_hub-0.5.
|
75
|
+
worker_automate_hub/worker.py,sha256=CT-poyP1ZYvubArYsnnNd9oJ53SPaDwgr6p6keS3nI4,6248
|
76
|
+
worker_automate_hub-0.5.15.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
77
|
+
worker_automate_hub-0.5.15.dist-info/METADATA,sha256=Br4m1Z6PcrVLsmlATf_nc7nN_ZIkIqURWcuXZvvHMSc,2894
|
78
|
+
worker_automate_hub-0.5.15.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
79
|
+
worker_automate_hub-0.5.15.dist-info/RECORD,,
|
File without changes
|
{worker_automate_hub-0.5.13.dist-info → worker_automate_hub-0.5.15.dist-info}/entry_points.txt
RENAMED
File without changes
|