worker-automate-hub 0.5.772__py3-none-any.whl → 0.5.774__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.
@@ -144,41 +144,42 @@ async def get_processo(uuidProcesso: str) -> RpaProcesso:
144
144
  RpaProcesso: O processo caso tenha sido encontrado.
145
145
  """
146
146
  env_config, _ = load_env_config()
147
- try:
148
- if not uuidProcesso:
149
- raise ValueError("O uuid do processo deve ser informado")
147
+ x = 0
148
+ while x < 10:
149
+ try:
150
+ if not uuidProcesso:
151
+ raise ValueError("O uuid do processo deve ser informado")
150
152
 
151
- headers_basic = {"Authorization": f"Basic {env_config["API_AUTHORIZATION"]}"}
152
- timeout = aiohttp.ClientTimeout(total=600)
153
+ headers_basic = {"Authorization": f"Basic {env_config["API_AUTHORIZATION"]}"}
154
+ timeout = aiohttp.ClientTimeout(total=600)
153
155
 
154
- async with aiohttp.ClientSession(
155
- connector=aiohttp.TCPConnector(verify_ssl=True), timeout=timeout
156
- ) as session:
157
- async with session.get(
158
- f"{env_config["API_BASE_URL"]}/processo/{uuidProcesso}",
159
- headers=headers_basic,
160
- ) as response:
161
- if response.status != 200:
162
- error_content = await response.text()
163
- raise Exception(f"Erro ao obter o processo: {error_content}")
164
- res = await response.json()
165
- if type(res["campos"]) == str and res["campos"] == "{}":
166
- res["campos"] = {}
167
- return RpaProcesso(**res)
156
+ async with aiohttp.ClientSession(
157
+ connector=aiohttp.TCPConnector(verify_ssl=True), timeout=timeout
158
+ ) as session:
159
+ async with session.get(
160
+ f"{env_config["API_BASE_URL"]}/processo/{uuidProcesso}",
161
+ headers=headers_basic,
162
+ ) as response:
163
+ if response.status != 200:
164
+ x += 1
165
+ console.print(f"Erro ao obter o processo: {response.content}")
166
+ continue
167
+ else:
168
+ res = await response.json()
169
+ if type(res["campos"]) == str and res["campos"] == "{}":
170
+ res["campos"] = {}
171
+ return RpaProcesso(**res)
168
172
 
169
- except ValueError as e:
170
- logger.error(f"Erro ao obter o processo: {str(e)}")
171
- console.print(
172
- f"{e}\n",
173
- style="bold red",
174
- )
175
- except Exception as e:
176
- logger.error(f"Erro ao obter o processo: {str(e)}")
177
- console.print(
178
- f"{e}\n",
179
- style="bold red",
173
+ except ValueError as e:
174
+ x += 1
175
+ logger.error(f"Erro ao obter o processo: {str(e)}")
176
+ console.print(
177
+ f"{e}\n",
178
+ style="bold red",
180
179
  )
181
- return None
180
+ continue
181
+
182
+ return None
182
183
 
183
184
 
184
185
  async def get_workers():
@@ -1066,6 +1066,7 @@ async def entrada_de_notas_9(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
1066
1066
  # Converte de volta para string no mesmo formato
1067
1067
  data_vencimento = data_dt_venc.strftime("%d/%m/%Y")
1068
1068
  # vencimento.set_edit_text(data_vencimento)
1069
+ vencimento.set_edit_text(data_vencimento)
1069
1070
  else:
1070
1071
  data_vencimento = nota.get("dataVencimento")
1071
1072
  await worker_sleep(2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: worker-automate-hub
3
- Version: 0.5.772
3
+ Version: 0.5.774
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
@@ -1,7 +1,7 @@
1
1
  worker_automate_hub/__init__.py,sha256=LV28uQvBfpPIqudGIMJmVB8E941MjXHcu8DMoX5n8AM,25
2
2
  worker_automate_hub/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  worker_automate_hub/api/ahead_service.py,sha256=QbNrZf9q7fS0s-S5fZVytqC7dINi9u2f6aB6SDrGVVA,2231
4
- worker_automate_hub/api/client.py,sha256=gKuIUhdAiMFE4YK3nR4SR2W8p1v4--7I64Pjs0oJsyM,31956
4
+ worker_automate_hub/api/client.py,sha256=QY6OgIIkkB1bSJikRfYdDhTm6Wza_J3pGdrG4Q_jW_g,32003
5
5
  worker_automate_hub/api/datalake_service.py,sha256=qw_N_OOgDKDuPbI-fdYkWWTlT4CUtFTl0VVlZ0fLM-M,3001
6
6
  worker_automate_hub/api/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  worker_automate_hub/api/helpers/api_helpers.py,sha256=SkheO2fXexeh-a4shr8Qzsz_kZhuSG0DJ7kbODctRbM,3696
@@ -65,7 +65,7 @@ worker_automate_hub/tasks/jobs/entrada_de_notas_500.py,sha256=WBsCRbH7ANiCjEn0aE
65
65
  worker_automate_hub/tasks/jobs/entrada_de_notas_503.py,sha256=bcNKy6X1aaVe6lxW-TMyUKJ_GXzHEK-8V6x9SOzOshw,48365
66
66
  worker_automate_hub/tasks/jobs/entrada_de_notas_505.py,sha256=xXeNipdXTSll8yAtAmN7v0sjN3oMlWU4THu30mKDddc,30339
67
67
  worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=7POfKc7nisc8-ysgqazrK8kT7kmFIq8irGwCMixPAE0,37948
68
- worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=19Lgq9ml4pK4UUrSq_KcgMTtaiVHocS5rurdKWkTRqI,66345
68
+ worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=X5_0E8SH34OdacNSxHWIsRcGE7Vf2psruK4992zBHu4,66408
69
69
  worker_automate_hub/tasks/jobs/entrada_de_notas_9000.py,sha256=0mOmS28tQKF5m7vMzInblDuWH48_qIgrohOU5UwYZ10,65498
70
70
  worker_automate_hub/tasks/jobs/exemplo_processo.py,sha256=nV0iLoip2FH2-FhLmhX3nPqsfl_MPufZ3E5Q5krJvdc,3544
71
71
  worker_automate_hub/tasks/jobs/extracao_fechamento_contabil.py,sha256=6Kr5DKjKLqtFvGzyiXtt7xrQsuU898l8pQXDq9C6AX8,19567
@@ -101,7 +101,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
101
101
  worker_automate_hub/utils/util.py,sha256=V2WtWoETdTrAtGA8UgeqAAVphUj9KkGSZFzYsHJFATA,210055
102
102
  worker_automate_hub/utils/utils_nfe_entrada.py,sha256=TOXKSHOPxy8N3-ROpTGjNIHstX0i2b8qekcj1tRvjG8,38174
103
103
  worker_automate_hub/worker.py,sha256=uhZ3f-iaQ1i8cANbljp50vkYl-Xm0_sHtjwwF_2y72o,7191
104
- worker_automate_hub-0.5.772.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
105
- worker_automate_hub-0.5.772.dist-info/METADATA,sha256=sXMvrO2yjL0tnx3Yqmk6gvds9QJRiL1hWblWFhXxF6U,3049
106
- worker_automate_hub-0.5.772.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
107
- worker_automate_hub-0.5.772.dist-info/RECORD,,
104
+ worker_automate_hub-0.5.774.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
105
+ worker_automate_hub-0.5.774.dist-info/METADATA,sha256=MNrimNzjlJR6CLSkXslJVy0QCi1YVq0R9F1at8vo_mo,3049
106
+ worker_automate_hub-0.5.774.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
107
+ worker_automate_hub-0.5.774.dist-info/RECORD,,