worker-automate-hub 0.5.596__py3-none-any.whl → 0.5.598__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/jobs/extracao_fechamento_contabil.py +16 -5
- {worker_automate_hub-0.5.596.dist-info → worker_automate_hub-0.5.598.dist-info}/METADATA +2 -1
- {worker_automate_hub-0.5.596.dist-info → worker_automate_hub-0.5.598.dist-info}/RECORD +5 -5
- {worker_automate_hub-0.5.596.dist-info → worker_automate_hub-0.5.598.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.596.dist-info → worker_automate_hub-0.5.598.dist-info}/entry_points.txt +0 -0
@@ -383,7 +383,7 @@ async def extracao_fechamento_contabil(
|
|
383
383
|
caminho_ajustado = caminho_arquivo.with_suffix('.xls')
|
384
384
|
nome_com_extensao = caminho_ajustado.name
|
385
385
|
print(nome_com_extensao)
|
386
|
-
|
386
|
+
# Renomeia o arquivo
|
387
387
|
os.rename(caminho_arquivo, caminho_ajustado)
|
388
388
|
|
389
389
|
console.print(f"Arquivo renomeado para: {caminho_ajustado}")
|
@@ -432,10 +432,10 @@ async def extracao_fechamento_contabil(
|
|
432
432
|
json.dump(dados_json, f, ensure_ascii=False, indent=2)
|
433
433
|
|
434
434
|
# Exibe o JSON formatado
|
435
|
-
print(json.dumps(dados_json, ensure_ascii=False, indent=2))
|
435
|
+
console.print(json.dumps(dados_json, ensure_ascii=False, indent=2))
|
436
436
|
|
437
437
|
await worker_sleep(3)
|
438
|
-
|
438
|
+
sended_to_datalake= False
|
439
439
|
console.print("Enviar arquivo para o Datalake")
|
440
440
|
# Envia o JSON para o datalake
|
441
441
|
directory = "balancete_contabil/raw"
|
@@ -443,9 +443,11 @@ async def extracao_fechamento_contabil(
|
|
443
443
|
with open(full_path, "rb") as file:
|
444
444
|
file_bytes = io.BytesIO(file.read())
|
445
445
|
try:
|
446
|
-
|
446
|
+
console.print("Enviando Json para data lake")
|
447
|
+
await send_file_to_datalake(
|
447
448
|
directory, file_bytes, filename, "json"
|
448
449
|
)
|
450
|
+
sended_to_datalake= True
|
449
451
|
except Exception as e:
|
450
452
|
console.print(f"Erro ao enviar o arquivo: {e}", style="bold red")
|
451
453
|
return RpaRetornoProcessoDTO(
|
@@ -454,7 +456,7 @@ async def extracao_fechamento_contabil(
|
|
454
456
|
status=RpaHistoricoStatusEnum.Falha,
|
455
457
|
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
456
458
|
)
|
457
|
-
|
459
|
+
sended_to_bof= False
|
458
460
|
# lê o arquivo
|
459
461
|
with open(f"{caminho_ajustado}", "rb") as file:
|
460
462
|
file_bytes = io.BytesIO(file.read())
|
@@ -473,6 +475,7 @@ async def extracao_fechamento_contabil(
|
|
473
475
|
os.remove(f"{caminho_ajustado}")
|
474
476
|
console.print("Removendo arquivo JSON da pasta downloads")
|
475
477
|
os.remove(full_path)
|
478
|
+
sended_to_bof= True
|
476
479
|
except Exception as e:
|
477
480
|
result = f"Arquivo Balancete contábil gerado com sucesso, porém gerou erro ao realizar o envio para o backoffice {e} - Arquivo ainda salvo na dispositivo utilizado no diretório {caminho_arquivo} !"
|
478
481
|
console.print(result, style="bold red")
|
@@ -482,6 +485,14 @@ async def extracao_fechamento_contabil(
|
|
482
485
|
status=RpaHistoricoStatusEnum.Falha,
|
483
486
|
tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
|
484
487
|
)
|
488
|
+
|
489
|
+
if sended_to_datalake and sended_to_bof:
|
490
|
+
return RpaRetornoProcessoDTO(
|
491
|
+
sucesso=True,
|
492
|
+
retorno="Sucesso ao processar Integração Contabil ",
|
493
|
+
status=RpaHistoricoStatusEnum.Sucesso,
|
494
|
+
|
495
|
+
)
|
485
496
|
except Exception as erro:
|
486
497
|
return RpaRetornoProcessoDTO(
|
487
498
|
sucesso=False,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: worker-automate-hub
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.598
|
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
|
@@ -53,6 +53,7 @@ Requires-Dist: webdriver-manager (>=4.0.2,<5.0.0)
|
|
53
53
|
Requires-Dist: win10toast (>=0.9,<0.10)
|
54
54
|
Requires-Dist: xhtml2pdf (>=0.2.16,<0.3.0)
|
55
55
|
Requires-Dist: xlib (>=0.21,<0.22)
|
56
|
+
Requires-Dist: xlrd (>=2.0.1,<3.0.0)
|
56
57
|
Description-Content-Type: text/markdown
|
57
58
|
|
58
59
|
# Worker Automate Hub
|
@@ -66,7 +66,7 @@ worker_automate_hub/tasks/jobs/entrada_de_notas_505.py,sha256=xXeNipdXTSll8yAtAm
|
|
66
66
|
worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=aSgHterguK9XGtq0Bf__YlXo5pewb9P-BRZTLnrH1D8,29020
|
67
67
|
worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=VJ-2g7tuqbAICOarJpAhljjJJ5wbb5hphTboBWoxj7M,64639
|
68
68
|
worker_automate_hub/tasks/jobs/exemplo_processo.py,sha256=nV0iLoip2FH2-FhLmhX3nPqsfl_MPufZ3E5Q5krJvdc,3544
|
69
|
-
worker_automate_hub/tasks/jobs/extracao_fechamento_contabil.py,sha256=
|
69
|
+
worker_automate_hub/tasks/jobs/extracao_fechamento_contabil.py,sha256=aU_8Z9N252sCnUGlDRoO7nF_R8BC86fIBdPCk-ufTRA,19723
|
70
70
|
worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py,sha256=UWAKCS2dbfgDlSQOBdjmVJXfD1MMuUrOi3weDgB0CAc,5718
|
71
71
|
worker_automate_hub/tasks/jobs/fidc_exportacao_docs_portal_b2b.py,sha256=SOs2mORBJqHs089ApbLaPJVRXM7wWhf0e99URXqPlpQ,15020
|
72
72
|
worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py,sha256=zu92tRCvKPK0U6IGGF28ST-kERohJcNbys-DWk0tIco,12555
|
@@ -93,7 +93,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
|
|
93
93
|
worker_automate_hub/utils/util.py,sha256=_pgZOFWgXoov6WPbqyRTDVXJCRFfucYB3gb9swzU7bo,198281
|
94
94
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=wmnpuOesmPSryZszmapa37b9YNC0E2MkeDYnbwr-0rU,33315
|
95
95
|
worker_automate_hub/worker.py,sha256=axdrr1xLTjWEyWfcyH3OCSpPTsyzck_fL_0u1DBLjvw,6525
|
96
|
-
worker_automate_hub-0.5.
|
97
|
-
worker_automate_hub-0.5.
|
98
|
-
worker_automate_hub-0.5.
|
99
|
-
worker_automate_hub-0.5.
|
96
|
+
worker_automate_hub-0.5.598.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
97
|
+
worker_automate_hub-0.5.598.dist-info/METADATA,sha256=0u426YwK2ieWdY1jTz0ESp205NQUCVjLHdBWVG63kdg,3049
|
98
|
+
worker_automate_hub-0.5.598.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
99
|
+
worker_automate_hub-0.5.598.dist-info/RECORD,,
|
File without changes
|
{worker_automate_hub-0.5.596.dist-info → worker_automate_hub-0.5.598.dist-info}/entry_points.txt
RENAMED
File without changes
|