Merge pull request 'refs #2688 make Configurar with gen-script=true both synchronous and faster' (#58) from gen-script-faster into main
Reviewed-on: #58inv-hw 8.1.1
commit
89a2ed2f68
|
@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [8.1.1] - 2025-08-28
|
||||
|
||||
### Changed
|
||||
|
||||
- Make Configurar with gen-script=true both synchronous and faster
|
||||
|
||||
## [8.1.0] - 2025-08-28
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -595,15 +595,18 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
cmd = {
|
||||
'nfn': 'RESPUESTA_Configurar',
|
||||
}
|
||||
if 'true' != check_sizes:
|
||||
|
||||
if 'true' == gen_script:
|
||||
script_contents = Path (script_out).read_bytes()
|
||||
cmd['script'] = base64.b64encode (script_contents).decode ('utf-8')
|
||||
|
||||
## si check_sizes y gen_script son falsos, entonces hemos reparticionado el disco: leer configuración de nuevo
|
||||
if 'true' != check_sizes and 'true' != gen_script:
|
||||
cfg = self.LeeConfiguracion()
|
||||
if not cfg:
|
||||
logger.warning ('No se ha podido recuperar la configuración de las particiones del disco')
|
||||
return {}
|
||||
cmd['cfg'] = self.cfg2obj (cfg)
|
||||
if 'true' == gen_script:
|
||||
script_contents = Path (script_out).read_bytes()
|
||||
cmd['script'] = base64.b64encode (script_contents).decode ('utf-8')
|
||||
|
||||
self.muestraMenu()
|
||||
return self.respuestaEjecucionComando (cmd, herror, ids)
|
||||
|
@ -1016,7 +1019,8 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
logger.debug ('in process_Configurar, path "{}" get_params "{}" post_params "{}" server "{}"'.format (path, get_params, post_params, server))
|
||||
|
||||
check_sizes = str ('check-sizes' in post_params and 'true' == post_params['check-sizes']).lower()
|
||||
if 'true' == check_sizes:
|
||||
gen_script = str ('gen-script' in post_params and 'true' == post_params['gen-script']).lower()
|
||||
if 'true' == check_sizes or 'true' == gen_script:
|
||||
return self.do_Configurar (post_params)
|
||||
|
||||
return self._long_running_job ('Configurar', self.do_Configurar, args=(post_params,))
|
||||
|
|
Loading…
Reference in New Issue