worker-automate-hub 0.5.773__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.
- worker_automate_hub/api/client.py +32 -31
- {worker_automate_hub-0.5.773.dist-info → worker_automate_hub-0.5.774.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.5.773.dist-info → worker_automate_hub-0.5.774.dist-info}/RECORD +5 -5
- {worker_automate_hub-0.5.773.dist-info → worker_automate_hub-0.5.774.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.5.773.dist-info → worker_automate_hub-0.5.774.dist-info}/entry_points.txt +0 -0
@@ -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
|
-
|
148
|
-
|
149
|
-
|
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
|
-
|
152
|
-
|
153
|
+
headers_basic = {"Authorization": f"Basic {env_config["API_AUTHORIZATION"]}"}
|
154
|
+
timeout = aiohttp.ClientTimeout(total=600)
|
153
155
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
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
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
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
|
-
|
180
|
+
continue
|
181
|
+
|
182
|
+
return None
|
182
183
|
|
183
184
|
|
184
185
|
async def get_workers():
|
@@ -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=
|
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
|
@@ -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.
|
105
|
-
worker_automate_hub-0.5.
|
106
|
-
worker_automate_hub-0.5.
|
107
|
-
worker_automate_hub-0.5.
|
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,,
|
File without changes
|
{worker_automate_hub-0.5.773.dist-info → worker_automate_hub-0.5.774.dist-info}/entry_points.txt
RENAMED
File without changes
|