worker-automate-hub 0.4.328__py3-none-any.whl → 0.4.329__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.
@@ -214,15 +214,15 @@ def run(
214
214
  help="Executa o download da pasta assets atualizada.",
215
215
  ),
216
216
  ):
217
+ if assets:
218
+ update_assets_v2()
219
+
217
220
  command = ["worker", "run"]
218
221
  if not force and is_command_running(command):
219
222
  console.print(
220
223
  "\nO script já está em execução. Saindo...\n", style="bold yellow"
221
224
  )
222
- raise Exit(code=0)
223
- elif assets:
224
- update_assets_v2()
225
- run_worker(stop_event)
225
+ raise Exit(code=0)
226
226
  else:
227
227
  run_worker(stop_event)
228
228
 
@@ -174,11 +174,11 @@ def update_assets_v2():
174
174
  try:
175
175
  env_config, _ = load_env_config()
176
176
  current_dir = f"{Path.cwd()}\\assets"
177
+ repo_url = env_config["GIT_ASSETS_URL"]
177
178
 
178
- # Remove o diretório existente se ele existir
179
179
  if not os.path.exists(current_dir):
180
180
  # Faz o clone do repositório
181
- repo_url = env_config["GIT_ASSETS_URL"]
181
+ console.print(f"Clonando o repositório {repo_url} para {current_dir}...", style="blue")
182
182
  clone_public_repo(repo_url, current_dir)
183
183
 
184
184
  console.print(
@@ -186,12 +186,24 @@ def update_assets_v2():
186
186
  style="bold green",
187
187
  )
188
188
  else:
189
- console.print(f"Atualizando o repositório em {current_dir}...")
190
- repo = git.Repo(current_dir)
191
- origin = repo.remotes.origin
192
- origin.fetch()
193
- origin.pull()
194
- console.print(f"Repositório atualizado com sucesso em {current_dir}.", style="green")
189
+ try:
190
+ console.print(f"Atualizando o repositório em {current_dir}...")
191
+ repo = git.Repo(current_dir)
192
+ origin = repo.remotes.origin
193
+ origin.fetch()
194
+ origin.pull()
195
+ console.print(f"Repositório atualizado com sucesso em {current_dir}.", style="green")
196
+ except:
197
+ console.print(f"Falha ao tentar atualizar, iniciando a limpeza...", style="red")
198
+ shutil.rmtree(current_dir, onerror=handle_remove_readonly)
199
+
200
+ console.print(f"Clonando o repositório {repo_url} para {current_dir}...", style="blue")
201
+ clone_public_repo(repo_url, current_dir)
202
+
203
+ console.print(
204
+ "\nTodos os arquivos e pastas foram baixados e salvos na pasta 'assets' com sucesso.\n",
205
+ style="bold green",
206
+ )
195
207
 
196
208
 
197
209
  except Exception as e:
@@ -86,7 +86,7 @@ def main_process(stop_event: threading.Event):
86
86
 
87
87
  custom_font = "slant"
88
88
  ascii_banner = pyfiglet.figlet_format(f"Worker", font=custom_font)
89
- os.system("cls")
89
+ # os.system("cls") Comentado temporariamente
90
90
  console.print(ascii_banner + f" versão: {atual_version}\n", style="bold blue")
91
91
  initial_msg = f"Worker em execução: {worker_config['NOME_ROBO']}"
92
92
  logger.info(initial_msg)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: worker-automate-hub
3
- Version: 0.4.328
3
+ Version: 0.4.329
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
@@ -5,11 +5,11 @@ worker_automate_hub/api/client.py,sha256=I-aOap7OSmzGNWJS9aSserhvLwoVVbf-orfbENg
5
5
  worker_automate_hub/api/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  worker_automate_hub/api/helpers/api_helpers.py,sha256=SkheO2fXexeh-a4shr8Qzsz_kZhuSG0DJ7kbODctRbM,3696
7
7
  worker_automate_hub/api/rpa_historico_service.py,sha256=WhTMVW-uNlJO3YZakhx63xlsw3_XDeWnSD-3MVEzzdk,4763
8
- worker_automate_hub/cli.py,sha256=Yk90syvdTKH5lhbwJRKdcKgWrAhWnojitn3rsdcxSHQ,6882
8
+ worker_automate_hub/cli.py,sha256=JB45pjPJ8_E-4xw0OjqDMcAw-tpDV0mjmvwJRTnTzY0,6862
9
9
  worker_automate_hub/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  worker_automate_hub/config/settings.py,sha256=4BkIYV0C9C_tl68WNfw3aoywr1-_bRJsKysSnSRALT0,2450
11
11
  worker_automate_hub/config.py,sha256=IDGBsScaX6X4tSXEGj-6CJKJQwKeiFDVAQ8k_ajwUV4,204
12
- worker_automate_hub/core/so_manipulation.py,sha256=m4SDDjYO2-Or69vZyo8Z19DhCeRXgYjrCfa0URwrzpI,8686
12
+ worker_automate_hub/core/so_manipulation.py,sha256=xMLv5A-V4F2Up6nlc1kiqABZCrC4iLobWmku35U2eYY,9335
13
13
  worker_automate_hub/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  worker_automate_hub/decorators/deprecation.py,sha256=l4tFokm2BZaXgAG5KDOczXxHHdbwCeL5ix5TYyjX0fA,747
15
15
  worker_automate_hub/decorators/rate_limit.py,sha256=oMF0C1IFArl983qM9kVD3pc2u3d3k1VcpPkORpHrfxU,1482
@@ -66,8 +66,8 @@ worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg
66
66
  worker_automate_hub/utils/updater.py,sha256=0LR6Xpe3HZk-xu-trH7vKRhP5FXp0nhp1qxtygE2Jps,7280
67
67
  worker_automate_hub/utils/util.py,sha256=YSSgkrbzabIkyy8W4GXpfu0tCPBVp1lddg1BYIuXJks,118568
68
68
  worker_automate_hub/utils/utils_nfe_entrada.py,sha256=VowHS7r3wRv3f-KAyJAqZLhe7Dkwj8CVaWGNNAQP9YY,27389
69
- worker_automate_hub/worker.py,sha256=dJxc6AtA2wNac6tU3s_SVb0IWKjKPWVBPYpCmEZRZ90,4606
70
- worker_automate_hub-0.4.328.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
71
- worker_automate_hub-0.4.328.dist-info/METADATA,sha256=LaIRfVD8T9LyGzvFZrThvQKwwxAe_PEyUr5N4D_d28I,2884
72
- worker_automate_hub-0.4.328.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
73
- worker_automate_hub-0.4.328.dist-info/RECORD,,
69
+ worker_automate_hub/worker.py,sha256=vkl_x7gSo6nQlhSBLwRkGx6LEONnYptfBaGxOy1ZLsE,4634
70
+ worker_automate_hub-0.4.329.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
71
+ worker_automate_hub-0.4.329.dist-info/METADATA,sha256=1t4k8SsOj3c-Xcr_4HyKXAYFFLFonczDsLvfl2TPM0k,2884
72
+ worker_automate_hub-0.4.329.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
73
+ worker_automate_hub-0.4.329.dist-info/RECORD,,