+
+ private void updateWSInfoGlobalStatus()
+ {
+ var jobs = worker.getJobs();
+ if (jobs.countRunning() > 0)
+ {
+ wsInfo.setStatus(WebserviceInfo.STATE_RUNNING);
+ }
+ else if (jobs.countQueuing() > 0
+ || jobs.countSubmitted() < jobs.size())
+ {
+ wsInfo.setStatus(WebserviceInfo.STATE_QUEUING);
+ }
+ else
+ {
+ if (jobs.countSuccessful() > 0)
+ {
+ wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_OK);
+ }
+ else if (jobs.countCancelled() > 0)
+ {
+ wsInfo.setStatus(WebserviceInfo.STATE_CANCELLED_OK);
+ }
+ else if (jobs.countFailed() > 0)
+ {
+ wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);
+ }
+ }
+ }