HOR-1726
This commit is contained in:
@@ -62,79 +62,85 @@ class workspaceTools
|
||||
*/
|
||||
public function upgrade($first = false, $buildCacheView = false, $workSpace = SYS_SYS, $onedb = false, $lang = 'en')
|
||||
{
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating database...\n");
|
||||
$this->upgradeDatabase($onedb);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Database Upgrade Process took " . ($stop - $start) . " seconds.\n");
|
||||
// $start = microtime(true);
|
||||
// CLI::logging("> Updating database...\n");
|
||||
// $this->upgradeDatabase($onedb);
|
||||
// $stop = microtime(true);
|
||||
// CLI::logging("<*> Database Upgrade Process took " . ($stop - $start) . " seconds.\n");
|
||||
//
|
||||
// $start = microtime(true);
|
||||
// CLI::logging("> Check Intermediate Email Event...\n");
|
||||
// $this->checkIntermediateEmailEvent();
|
||||
// $stop = microtime(true);
|
||||
// CLI::logging("<*> Database Upgrade Process took " . ($stop - $start) . " seconds.\n");
|
||||
//
|
||||
// $start = microtime(true);
|
||||
// CLI::logging("> Verify enterprise old...\n");
|
||||
// $this->verifyFilesOldEnterprise($workSpace);
|
||||
// $stop = microtime(true);
|
||||
// CLI::logging("<*> Verify took " . ($stop - $start) . " seconds.\n");
|
||||
//
|
||||
// $start = microtime(true);
|
||||
// CLI::logging("> Updating translations...\n");
|
||||
// $this->upgradeTranslation($first);
|
||||
// $stop = microtime(true);
|
||||
// $final = $stop - $start;
|
||||
// CLI::logging("<*> Updating Translations Process took $final seconds.\n");
|
||||
//
|
||||
// $start = microtime(true);
|
||||
// CLI::logging("> Updating Content...\n");
|
||||
// $this->upgradeContent($workSpace);
|
||||
// $stop = microtime(true);
|
||||
// $final = $stop - $start;
|
||||
// CLI::logging("<*> Updating Content Process took $final seconds.\n");
|
||||
//
|
||||
// $start = microtime(true);
|
||||
// CLI::logging("> Check Mafe Requirements...\n");
|
||||
// $this->checkMafeRequirements($workSpace, $lang);
|
||||
// $stop = microtime(true);
|
||||
// $final = $stop - $start;
|
||||
// CLI::logging("<*> Check Mafe Requirements Process took $final seconds.\n");
|
||||
//
|
||||
// $start = microtime(true);
|
||||
// CLI::logging("> Updating cache view...\n");
|
||||
// $this->upgradeCacheView($buildCacheView, true, $lang);
|
||||
// $stop = microtime(true);
|
||||
// $final = $stop - $start;
|
||||
// CLI::logging("<*> Updating cache view Process took $final seconds.\n");
|
||||
//
|
||||
// $start = microtime(true);
|
||||
// CLI::logging("> Backup log files...\n");
|
||||
// $this->backupLogFiles();
|
||||
// $stop = microtime(true);
|
||||
// $final = $stop - $start;
|
||||
// CLI::logging("<*> Backup log files Process took $final seconds.\n");
|
||||
//
|
||||
// /*----------------------------------********---------------------------------*/
|
||||
// $start = microtime(true);
|
||||
// CLI::logging("> Migrate new lists...\n");
|
||||
// $this->migrateList($workSpace, false, $lang);
|
||||
// $stop = microtime(true);
|
||||
// $final = $stop - $start;
|
||||
// CLI::logging("<*> Migrate new lists Process took $final seconds.\n");
|
||||
// /*----------------------------------********---------------------------------*/
|
||||
//
|
||||
// $start = microtime(true);
|
||||
// CLI::logging("> Updating Files Manager...\n");
|
||||
// $this->processFilesUpgrade();
|
||||
// $stop = microtime(true);
|
||||
// CLI::logging("<*> Updating Files Manager took " . ($stop - $start) . " seconds.\n");
|
||||
//
|
||||
// $start = microtime(true);
|
||||
// CLI::logging("> Optimizing content data...\n");
|
||||
// $this->migrateContent($workSpace, $lang);
|
||||
// $stop = microtime(true);
|
||||
// CLI::logging("<*> Optimizing content data took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Check Intermediate Email Event...\n");
|
||||
$this->checkIntermediateEmailEvent();
|
||||
CLI::logging("> Clean access and refresh tokens...\n");
|
||||
$this->cleanTokens($workSpace);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Database Upgrade Process took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Verify enterprise old...\n");
|
||||
$this->verifyFilesOldEnterprise($workSpace);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Verify took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating translations...\n");
|
||||
$this->upgradeTranslation($first);
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Updating Translations Process took $final seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating Content...\n");
|
||||
$this->upgradeContent($workSpace);
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Updating Content Process took $final seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Check Mafe Requirements...\n");
|
||||
$this->checkMafeRequirements($workSpace, $lang);
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Check Mafe Requirements Process took $final seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating cache view...\n");
|
||||
$this->upgradeCacheView($buildCacheView, true, $lang);
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Updating cache view Process took $final seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Backup log files...\n");
|
||||
$this->backupLogFiles();
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Backup log files Process took $final seconds.\n");
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Migrate new lists...\n");
|
||||
$this->migrateList($workSpace, false, $lang);
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Migrate new lists Process took $final seconds.\n");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating Files Manager...\n");
|
||||
$this->processFilesUpgrade();
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Updating Files Manager took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Optimizing content data...\n");
|
||||
$this->migrateContent($workSpace, $lang);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Optimizing content data took " . ($stop - $start) . " seconds.\n");
|
||||
CLI::logging("<*> Clean access and refresh tokens took " . ($stop - $start) . " seconds.\n");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3221,6 +3227,19 @@ class workspaceTools
|
||||
}
|
||||
}
|
||||
|
||||
public function cleanTokens($workspace, $lang = SYS_LANG)
|
||||
{
|
||||
$this->initPropel(true);
|
||||
$oCriteria = new Criteria();
|
||||
$oCriteria->add(OauthAccessTokensPeer::ACCESS_TOKEN, 0, Criteria::NOT_EQUAL);
|
||||
$accessToken = OauthAccessTokensPeer::doDelete($oCriteria);
|
||||
CLI::logging("|--> Clean data in table " . OauthAccessTokensPeer::TABLE_NAME . " rows ".$accessToken."\n");
|
||||
$oCriteria = new Criteria();
|
||||
$oCriteria->add(OauthRefreshTokensPeer::REFRESH_TOKEN, 0, Criteria::NOT_EQUAL);
|
||||
$refreshToken = OauthRefreshTokensPeer::doDelete($oCriteria);
|
||||
CLI::logging("|--> Clean data in table " . OauthRefreshTokensPeer::TABLE_NAME . " rows ".$refreshToken."\n");
|
||||
}
|
||||
|
||||
public function migrateIteeToDummytask($workspaceName){
|
||||
$this->initPropel(true);
|
||||
if (!defined("SYS_SYS")) {
|
||||
|
||||
Reference in New Issue
Block a user