{
// TODO: investigate if we still need to cast here in J1.6
MsaWSJob j=((MsaWSJob) job);
+ // this is standard code, but since the interface doesn't comprise of a basic one that implements (getJobStatus, pullExecStatistics) we have to repeat the code for all jw2s services.
j.setjobStatus(server.getJobStatus(job.getJobId()));
+ updateJobProgress(j);
+ }
+ protected void updateJobProgress(MsaWSJob j) throws Exception {
StringBuffer response = j.jobProgress;
- ChunkHolder chunk = server.pullExecStatistics(job.getJobId(), j.getLastChunk());
- response.append(chunk.getChunk());
- j.setLastChunk(chunk.getNextPosition());
-
+ long lastchunk = j.getLastChunk();
+ do {
+ j.setLastChunk(lastchunk);
+ ChunkHolder chunk = server.pullExecStatistics(j.getJobId(), lastchunk);
+ if (chunk!=null) {
+ response.append(chunk.getChunk());
+ lastchunk = chunk.getNextPosition();
+ };
+ } while (lastchunk>=0 && j.getLastChunk()!=lastchunk);
}
public void StartJob(AWsJob job)
if (jobs[j].isFinished() && msjob.alignment==null)
{
try {
+ updateJobProgress(msjob);
+ } catch (Exception e)
+ {
+ Cache.log.warn("Exception when retrieving remaining Job progress data for job "+msjob.getJobId()+" on server "+WsUrl);
+ e.printStackTrace();
+ }
+ if (Cache.log.isDebugEnabled())
+ {
+ System.out.println("Job Execution file for job: "+msjob.getJobId()+" on server "+WsUrl);
+ System.out.println(msjob.getStatus());
+ System.out.println("*** End of status");
+
+ }
+ try {
msjob.alignment = server.getResult(msjob.getJobId());
}
catch (Exception e)