worker-automate-hub 0.5.14__py3-none-any.whl → 0.5.16__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- worker_automate_hub/api/webhook_service.py +2 -2
- worker_automate_hub/utils/util.py +4 -1
- worker_automate_hub/worker.py +5 -0
- {worker_automate_hub-0.5.14.dist-info → worker_automate_hub-0.5.16.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.5.14.dist-info → worker_automate_hub-0.5.16.dist-info}/RECORD +7 -7
- {worker_automate_hub-0.5.14.dist-info → worker_automate_hub-0.5.16.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.14.dist-info → worker_automate_hub-0.5.16.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,
|
@@ -34,6 +34,8 @@ from worker_automate_hub.models.dao.rpa_configuracao import RpaConfiguracao
|
|
34
34
|
from worker_automate_hub.models.dto.rpa_historico_request_dto import (
|
35
35
|
RpaHistoricoStatusEnum,
|
36
36
|
RpaRetornoProcessoDTO,
|
37
|
+
RpaTagDTO,
|
38
|
+
RpaTagEnum,
|
37
39
|
)
|
38
40
|
from worker_automate_hub.models.dto.rpa_processo_entrada_dto import (
|
39
41
|
RpaProcessoEntradaDTO,
|
@@ -2912,8 +2914,9 @@ async def rateio_despesa(unidade_code: str) -> RpaRetornoProcessoDTO:
|
|
2912
2914
|
main_window = app["Busca Centro de Custo"]
|
2913
2915
|
return RpaRetornoProcessoDTO(
|
2914
2916
|
sucesso=False,
|
2915
|
-
retorno=f"
|
2917
|
+
retorno=f"Centro de custo não localizado na tela de rateio, por favor, verificar",
|
2916
2918
|
status=RpaHistoricoStatusEnum.Falha,
|
2919
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
2917
2920
|
)
|
2918
2921
|
except Exception as e:
|
2919
2922
|
return RpaRetornoProcessoDTO(
|
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
|
@@ -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=x6KOiTPHteuNuw1b-i9IiyUtjxi6RB8vcpRcuJWjtuI,126596
|
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.16.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
77
|
+
worker_automate_hub-0.5.16.dist-info/METADATA,sha256=n3-4FUKeu-xhT-Pd8OD5LD2NgFoFXtFMIvCiAgcPNBM,2894
|
78
|
+
worker_automate_hub-0.5.16.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
79
|
+
worker_automate_hub-0.5.16.dist-info/RECORD,,
|
File without changes
|
{worker_automate_hub-0.5.14.dist-info → worker_automate_hub-0.5.16.dist-info}/entry_points.txt
RENAMED
File without changes
|