Improvement to get the workspace info in the user authentication

- Now only once time per day get the workspace info
This commit is contained in:
Julio Cesar Laura
2012-09-24 14:44:08 -04:00
parent 648c7f095d
commit b9ed53ed87
5 changed files with 24 additions and 4 deletions

View File

@@ -213,7 +213,7 @@ class serverConf {
/** /**
* Will return a list of all WS in this system and their related information. * Will return a list of all WS in this system and their related information.
* @uses getWorkspaceInfo * @uses getWSList
* param * param
* @return array * @return array
*/ */
@@ -226,7 +226,6 @@ class serverConf {
if (($file != ".") && ($file != "..")) { if (($file != ".") && ($file != "..")) {
if (file_exists ( PATH_DB . $file . '/db.php' )) { //print $file."/db.php <hr>"; if (file_exists ( PATH_DB . $file . '/db.php' )) { //print $file."/db.php <hr>";
$statusl = ($this->isWSDisabled ( $file )) ? 'DISABLED' : 'ENABLED'; $statusl = ($this->isWSDisabled ( $file )) ? 'DISABLED' : 'ENABLED';
//$wsInfo = $this->getWorkspaceInfo ( $file );
if(isset($this->aWSinfo[$file])){ if(isset($this->aWSinfo[$file])){
$wsInfo = $this->aWSinfo[$file]; $wsInfo = $this->aWSinfo[$file];
}else{ }else{

View File

@@ -68,6 +68,15 @@
<parameter name="Seq_in_index" value="1"/> <parameter name="Seq_in_index" value="1"/>
</vendor> </vendor>
</index> </index>
<index name="indexAppStatus">
<index-column name="APP_STATUS"/>
<vendor type="mysql">
<parameter name="Table" value="APPLICATION"/>
<parameter name="Non_unique" value="1"/>
<parameter name="Key_name" value="indexAppStatus"/>
<parameter name="Seq_in_index" value="1"/>
</vendor>
</index>
</table> </table>
<table name="APP_DELEGATION"> <table name="APP_DELEGATION">
<vendor type="mysql"> <vendor type="mysql">

View File

@@ -53,6 +53,10 @@ CREATE TABLE [APPLICATION]
CREATE INDEX [indexApp] ON [APPLICATION] ([PRO_UID],[APP_STATUS],[APP_UID]); CREATE INDEX [indexApp] ON [APPLICATION] ([PRO_UID],[APP_STATUS],[APP_UID]);
CREATE INDEX [indexAppNumber] ON [APPLICATION] ([APP_NUMBER]);
CREATE INDEX [indexAppStatus] ON [APPLICATION] ([APP_STATUS]);
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
/* APP_DELEGATION */ /* APP_DELEGATION */
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@@ -30,7 +30,8 @@ CREATE TABLE `APPLICATION`
`APP_PIN` VARCHAR(32) default '' NOT NULL, `APP_PIN` VARCHAR(32) default '' NOT NULL,
PRIMARY KEY (`APP_UID`), PRIMARY KEY (`APP_UID`),
KEY `indexApp`(`PRO_UID`, `APP_STATUS`, `APP_UID`), KEY `indexApp`(`PRO_UID`, `APP_STATUS`, `APP_UID`),
KEY `indexAppNumber`(`APP_NUMBER`) KEY `indexAppNumber`(`APP_NUMBER`),
KEY `indexAppStatus`(`APP_STATUS`)
)ENGINE=MyISAM DEFAULT CHARSET='utf8' COMMENT='The application'; )ENGINE=MyISAM DEFAULT CHARSET='utf8' COMMENT='The application';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- APP_DELEGATION #-- APP_DELEGATION

View File

@@ -212,7 +212,14 @@ try {
/**end log**/ /**end log**/
//************** background processes, here we are putting some back office routines ********** //************** background processes, here we are putting some back office routines **********
$oServerConf->setWsInfo(SYS_SYS,$oServerConf->getWorkspaceInfo(SYS_SYS) ); $heartBeatNWIDate = $oServerConf->getHeartbeatProperty('HB_NEXT_GWI_DATE','HEART_BEAT_CONF');
if (is_null($heartBeatNWIDate)) {
$heartBeatNWIDate = time();
}
if (time() >= $heartBeatNWIDate) {
$oServerConf->setWsInfo(SYS_SYS, $oServerConf->getWorkspaceInfo(SYS_SYS));
$oServerConf->setHeartbeatProperty('HB_NEXT_GWI_DATE', strtotime('+1 day'), 'HEART_BEAT_CONF');
}
//**** defining and saving server info, this file has the values of the global array $_SERVER **** //**** defining and saving server info, this file has the values of the global array $_SERVER ****
//this file is useful for command line environment (no Browser), I mean for triggers, crons and other executed over command line //this file is useful for command line environment (no Browser), I mean for triggers, crons and other executed over command line