Changeset 1773
- Timestamp:
- 05/08/09 14:29:06 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Engine/3.2/HiveEngine.cs
r1754 r1773 125 125 IExecutionEngineFacade executionEngineFacade = ServiceLocator.CreateExecutionEngineFacade(HiveServerUrl); 126 126 127 //Requests the last result. 128 //false: There will always be a result that is been sent back 129 //true: if you hit "requestsnapshot" before - it won't send you the job back if 130 // the snapshot hasn't been submitted to the server (because the client needs 131 // more time). 132 var result = executionEngineFacade.GetLastResult(jobId, false); 133 if (result.Success) { 134 JobResult jobResult = result.Obj; 127 // request snapshot 128 executionEngineFacade.RequestSnapshot(jobId); 129 130 // poll until snapshot is ready 131 ResponseObject<JobResult> response; 132 do { 133 response = executionEngineFacade.GetLastResult(jobId, true); 134 if (response.Success && response.StatusMessage == ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE) { 135 Thread.Sleep(1000); 136 } 137 } while (response.Success && response.StatusMessage == ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE); 138 139 if (response.Success) { 140 JobResult jobResult = response.Obj; 135 141 if (jobResult != null) { 136 142 job = (Job)PersistenceManager.RestoreFromGZip(jobResult.Result); … … 138 144 } 139 145 } else { 140 Exception ex = new Exception(res ult.Obj.Exception.Message);146 Exception ex = new Exception(response.Obj.Exception.Message); 141 147 ThreadPool.QueueUserWorkItem(delegate(object state) { OnExceptionOccurred(ex); }); 142 148 }
Note: See TracChangeset
for help on using the changeset viewer.