jstate.updateJobPanelState(wsInfo, OutputHeader, jobs[j]);
}
// Decide on overall state based on collected jobs[] states
- if (jstate.running > 0)
- {
- wsInfo.setStatus(WebserviceInfo.STATE_RUNNING);
- }
- else if (jstate.queuing > 0)
- {
- wsInfo.setStatus(WebserviceInfo.STATE_QUEUING);
- }
- else
- {
- jobComplete = true;
- if (jstate.finished > 0)
- {
- wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_OK);
- }
- else if (jstate.error > 0)
- {
- wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);
- }
- else if (jstate.serror > 0)
- {
- wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR);
- }
- }
+ updateGlobalStatus(jstate);
if (!jobComplete)
{
try
}
}
+ protected void updateGlobalStatus(JobStateSummary jstate)
+ {
+ if (jstate.running > 0)
+ {
+ wsInfo.setStatus(WebserviceInfo.STATE_RUNNING);
+ }
+ else if (jstate.queuing > 0)
+ {
+ wsInfo.setStatus(WebserviceInfo.STATE_QUEUING);
+ }
+ else
+ {
+ jobComplete = true;
+ if (jstate.finished > 0)
+ {
+ wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_OK);
+ }
+ else if (jstate.error > 0)
+ {
+ wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);
+ }
+ else if (jstate.serror > 0)
+ {
+ wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR);
+ }
+ }
+ }
+
public AWSThread()
{
super();