HOR-1900 "Slowness in version upgrade" SOLVED
Issue:
Slowness in version upgrade
Cause:
El modulo de actualizacion de los XML files tiene un tiempo de procesamiento largo
Solution:
Se implementa la opcion "--no-xml" para los siguientes comandos:
- ./processmaker upgrade --no-xml MyWorkspace //Un workspace
- ./processmaker upgrade --no-xml //Todos los workspaces
- ./processmaker workspace-upgrade --no-xml MyWorkspace //Un workspace
- ./processmaker workspace-upgrade --no-xml //Todos los workspaces
This commit is contained in:
@@ -33,7 +33,8 @@ G::LoadClass("cli");
|
||||
CLI::taskName('upgrade');
|
||||
CLI::taskDescription("Upgrade workspaces.\n\n This command should be run after upgrading ProcessMaker to a new version so that all workspaces are also upgraded to the\n new version.");
|
||||
|
||||
CLI::taskOpt("buildACV", "If this option is enabled, the Cache View is built.", "ACV", "buildACV");
|
||||
CLI::taskOpt('buildACV', 'If this option is enabled, the Cache View is built.', 'ACV', 'buildACV');
|
||||
CLI::taskOpt('noxml', 'If this option is enabled, the XML files translation is not built.', 'NoXml', 'no-xml');
|
||||
CLI::taskRun("run_upgrade");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
CLI::taskName('unify-database');
|
||||
@@ -125,12 +126,14 @@ function run_upgrade($command, $args)
|
||||
G::rm_dir(PATH_C);
|
||||
G::mk_dir(PATH_C, 0777);
|
||||
}
|
||||
$workspaces = get_workspaces_from_args($command);
|
||||
|
||||
$count = count($workspaces);
|
||||
$first = true;
|
||||
$errors = false;
|
||||
$countWorkspace = 0;
|
||||
$buildCacheView = array_key_exists("buildACV", $args);
|
||||
$buildCacheView = array_key_exists('buildACV', $args);
|
||||
$flagUpdateXml = !array_key_exists('noxml', $args);
|
||||
|
||||
foreach ($workspaces as $index => $workspace) {
|
||||
if (!defined("SYS_SYS")) {
|
||||
define("SYS_SYS", $workspace->name);
|
||||
@@ -143,9 +146,10 @@ function run_upgrade($command, $args)
|
||||
try {
|
||||
$countWorkspace++;
|
||||
CLI::logging("Upgrading workspaces ($countWorkspace/$count): " . CLI::info($workspace->name) . "\n");
|
||||
$workspace->upgrade($first, $buildCacheView, $workspace->name);
|
||||
$workspace->upgrade($buildCacheView, $workspace->name, false, 'en', ['updateXml' => $flagUpdateXml, 'updateMafe' => $first]);
|
||||
$workspace->close();
|
||||
$first = false;
|
||||
$flagUpdateXml = false;
|
||||
} catch (Exception $e) {
|
||||
CLI::logging("Errors upgrading workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n");
|
||||
$errors = true;
|
||||
|
||||
Reference in New Issue
Block a user