Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1770 for trunk


Ignore:
Timestamp:
05/08/09 14:17:28 (16 years ago)
Author:
msteinbi
Message:

new functionality for snapshot requesting (#531)

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Contracts/3.2/ApplicationConstants.cs

    r1757 r1770  
    9393    public static string RESPONSE_JOB_REQUEST_SET = "Job.RequestSet";
    9494    public static string RESPONSE_JOB_ABORT_REQUEST_SET = "Job.AbortRequestSet";
     95    public static string RESPONSE_JOB_RESULT_NOT_YET_HERE = "Requested job result is not yet finished";
    9596  }
    9697}
  • trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientCommunicator.cs

    r1760 r1770  
    301301            // a request to abort the job has been set
    302302            response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id));
    303             curJob.State = State.offline;
     303            curJob.State = State.finished;
    304304          } else {
    305305            // save job progress
  • trunk/sources/HeuristicLab.Hive.Server.Core/3.2/JobManager.cs

    r1762 r1770  
    237237
    238238        ResponseObject<JobResult> response = new ResponseObject<JobResult>();
     239
     240        Job job = jobAdapter.GetById(jobId);
     241        if (requested && job.State == State.requestSnapshot) {
     242          response.Success = true;
     243          response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE;
     244          return response;
     245        }
     246         
    239247        response.Success = true;
    240248        response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_RESULT_SENT;
    241         response.Obj = GetLastJobResult(jobAdapter.GetById(jobId));
     249        response.Obj = GetLastJobResult(job);
    242250
    243251        return response;
Note: See TracChangeset for help on using the changeset viewer.