[ 1916373 ] InfoUpdater background thread read sys config value in loop

This commit is contained in:
Heng Sin Low 2008-03-17 06:06:21 +00:00
parent 34dea236ee
commit 0f970af92c
1 changed files with 22 additions and 18 deletions

View File

@ -674,23 +674,26 @@ public final class AMenu extends CFrame
// if (percent > 50) // if (percent > 50)
// System.gc(); // System.gc();
// Requests if (DB.isConnected())
int requests = getRequests(); {
bRequests.setText(Msg.translate(m_ctx, "R_Request_ID") + ": " + requests); // Requests
// Memo int requests = getRequests();
int notes = getNotes(); bRequests.setText(Msg.translate(m_ctx, "R_Request_ID") + ": " + requests);
bNotes.setText(Msg.translate(m_ctx, "AD_Note_ID") + ": " + notes); // Memo
// Activities int notes = getNotes();
int activities = wfActivity.getActivitiesCount(); bNotes.setText(Msg.translate(m_ctx, "AD_Note_ID") + ": " + notes);
centerPane.setTitleAt(m_tabActivities, Msg.getMsg (m_ctx, "WorkflowActivities") + ": " + activities); // Activities
/* int activities = wfActivity.getActivitiesCount();
log.config(msg centerPane.setTitleAt(m_tabActivities, Msg.getMsg (m_ctx, "WorkflowActivities") + ": " + activities);
+ ", Processors=" + Runtime.getRuntime().availableProcessors() /*
+ ", Requests=" + requests + ", Notes=" + notes + ", Activities=" + activities log.config(msg
+ "," + CConnection.get().getStatus() + ", Processors=" + Runtime.getRuntime().availableProcessors()
); + ", Requests=" + requests + ", Notes=" + notes + ", Activities=" + activities
*/ + "," + CConnection.get().getStatus()
MSystem.get(m_ctx).info(); );
*/
MSystem.get(m_ctx).info();
}
} // updateInfo } // updateInfo
@ -770,12 +773,13 @@ public final class AMenu extends CFrame
public void run() public void run()
{ {
int sleep = MSysConfig.getIntValue("MENU_INFOUPDATER_SLEEP_MS", 60000, Env.getAD_Client_ID(Env.getCtx()));
while(stop == false) while(stop == false)
{ {
updateInfo(); updateInfo();
try { try {
Thread.sleep(MSysConfig.getIntValue("MENU_INFOUPDATER_SLEEP_MS", 60000, Env.getAD_Client_ID(Env.getCtx()))); Thread.sleep(sleep);
} catch(InterruptedException ire) { } } catch(InterruptedException ire) { }
} }
} }