Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/18/10 22:16:04 (14 years ago)
Author:
kgrading
Message:

#828 added various improvements to the plugin cache manager, the execution engine, the transaction handling on the serverside and the server console

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/sources/HeuristicLab.Hive.Server.Core/3.2/JobManager.cs

    r3931 r4042  
    105105      ResponseList<JobDto> response = new ResponseList<JobDto>();
    106106      response.List = new List<JobDto>(DaoLocator.JobDao.FindWithLimitations(jobState, offset, count));
     107      response.Success = true;
    107108      return response;
    108109    }
     
    237238    }
    238239
     240    //Requested means: there MUST be a job result which gets sent back
    239241    public ResponseObject<SerializedJob>
    240       GetLastSerializedJobResultOf(Guid jobId, bool requested) {
     242      GetLastSerializedJobResultOf(Guid jobId, bool requested, bool snapshot) {
    241243      ResponseObject<SerializedJob> response =
    242244        new ResponseObject<SerializedJob>();
    243245
    244246      JobDto job = DaoLocator.JobDao.FindById(jobId);
    245       if (requested && (job.State == State.requestSnapshot || job.State == State.requestSnapshotSent)) {
     247
     248      //if it's a snapshot but the result hasn't reached the server yet...
     249      if (snapshot && (job.State == State.requestSnapshot || job.State == State.requestSnapshotSent)) {
    246250        response.Success = true;
    247251        response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE;
     
    250254      }
    251255
     256      //if it's NOT a snapshot, NEITHER request NOR is it finished
     257      if(!requested && !snapshot && job.State != State.finished) {     
     258        response.Success = true;
     259        response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE;
     260
     261        return response;
     262      }
     263
     264      //every other case - snapshot, job finished or it's requested
    252265      response.Success = true;
    253266      response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_RESULT_SENT;
    254267      response.Obj = new SerializedJob();
    255268      response.Obj.JobInfo = job;
     269
    256270      response.Obj.SerializedJobData =
    257271        DaoLocator.JobDao.GetBinaryJobFile(jobId);
     272
    258273      return response;
    259274    }
Note: See TracChangeset for help on using the changeset viewer.