Skip to content
Snippets Groups Projects
Commit e85a2e8b authored by Esteban Sassone's avatar Esteban Sassone
Browse files

Merge branch 'release/1.0.9'

parents 086db6a7 d124347d
No related branches found
Tags 1.0.9
No related merge requests found
......@@ -3,6 +3,7 @@ namespace SIU\SQ\Lib\procesos;
use SIU\SQ\Lib\constantes;
use SIU\SQ\Lib\db\sql;
use SIU\SQ\Lib\entorno\configurador;
use SIU\SQ\Lib\errores\error;
use SIU\SQ\Lib\lib;
......@@ -16,6 +17,7 @@ abstract class proceso
protected $procesados_ok;
protected $procesados_error;
protected $estado_inicial;
protected $verboso;
const ESTADO_INDEFINIDO = 0;
const ESTADO_OK = 1;
......@@ -39,7 +41,8 @@ abstract class proceso
$this->total_a_procesar = null;
$this->procesados_ok = 0;
$this->procesados_error = 0;
$this->estado_inicial = ($estado_inicial) ? $estado_inicial : self::ESTADO_INDEFINIDO;
$this->estado_inicial = ($estado_inicial) ? $estado_inicial : self::ESTADO_INDEFINIDO;
$this->verboso = false;
}
private function cargar()
......@@ -91,7 +94,10 @@ abstract class proceso
$this->ejecutar_especifico();
$this->entorno()->log()->info("FINALIZANDO PROCESO: [" . $this->datos['codigo'] . "] " . $this->datos['descripcion']);
}else{
$mensaje = "Sistema en modo mantenimiento." . PHP_EOL;
$config = new configurador();
$dir = $config->get_config_dir();
$proyecto = parse_ini_file($dir . "/../toba/proyecto.ini", TRUE);
$mensaje = $proyecto['proyecto']['mantenimiento_mensaje'] . PHP_EOL;
echo $mensaje;
$this->entorno->log()->warn($mensaje . " Intentando ejecutar el proceso: "
. "([" . $this->datos['codigo'] . "] " . $this->datos['descripcion'] . ")");
......@@ -142,6 +148,16 @@ abstract class proceso
{
$this->procesados_error++;
}
function es_verboso()
{
return $this->verboso;
}
function set_verboso($verboso)
{
$this->verboso = $verboso;
}
function iniciar_registro_ejecucion()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment