try
{
boolean cancelledJob = server.cancelJob(jobs[job].getJobId());
- if (cancelledJob || true)
+ if (true) // cancelledJob || true)
{
// CANCELLED_JOB
// if the Jaba server indicates the job can't be cancelled, its
.pullExecStatistics(j.getJobId(), lastchunk);
if (chunk != null)
{
- changed=chunk.getChunk().length()>0;
+ changed|=chunk.getChunk().length()>0;
response.append(chunk.getChunk());
lastchunk = chunk.getNextPosition();
+ try {
+ Thread.sleep(50);
+ } catch (InterruptedException x){};
}
;
} while (lastchunk >= 0 && j.getLastChunk() != lastchunk);
MsaWSJob msjob = ((MsaWSJob) jobs[j]);
if (jobs[j].isFinished() && msjob.alignment == null)
{
+ int nunchanged=3,nexcept=3;
boolean jpchanged=false,jpex=false;
do {
try
{
jpchanged = updateJobProgress(msjob);
jpex=false;
+ if (jpchanged) {
+ nexcept=3;
+ }
} catch (Exception e)
{
.warn("Exception when retrieving remaining Job progress data for job "
+ msjob.getJobId() + " on server " + WsUrl);
e.printStackTrace();
- if (jpex) {
- // give up polling after two consecutive exceptions
- jpchanged=false;
- } else {
- jpchanged=true;
- }
+ nexcept--;
+ nunchanged=3;
// set flag remember that we've had an exception.
jpex=true;
+ jpchanged=false;
}
- if (jpchanged)
+ if (!jpchanged)
{
try
{
- Thread.sleep(jpex ? 400 : 200); // wait a bit longer if we experienced an exception.
+ Thread.sleep(jpex ? 2400 : 1200); // wait a bit longer if we experienced an exception.
} catch (Exception ex)
{
}
;
- }
- } while (jpchanged);
+ nunchanged--;
+ }
+ } while (nunchanged>0 && nexcept>0);
if (Cache.log.isDebugEnabled())
{
Cache.log
.debug("Results not available for finished job - marking as broken job.",
e);
+ msjob.jobProgress
+ .append("\nResult not available. Probably due to invalid input or parameter settings. Server error message below:\n\n"
+ + e.getLocalizedMessage());
msjob.setjobStatus(JobStatus.FAILED);
} catch (Exception e)
{