Changeset 4170 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3
- Timestamp:
- 08/06/10 09:20:18 (14 years ago)
- Location:
- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3
- Property svn:ignore
-
old new 1 1 bin 2 2 obj 3 HeuristicLab.Hive.Server.Core-3.3.csproj.user
-
- Property svn:ignore
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs
r4141 r4170 469 469 //tx = session.BeginTransaction(); 470 470 471 ResponseResultReceived response = 472 ProcessJobResult( 473 result.ClientId, 474 result.JobId, 475 new byte[] { }, 476 result.Percentage, 477 result.Exception, 478 finished); 471 ResponseResultReceived response = ProcessJobResult(result.ClientId, result.JobId, new byte[] { }, result.Percentage, result.Exception, finished); 479 472 480 473 if (response.Success) { … … 509 502 Guid jobId, 510 503 byte[] result, 511 double percentage,512 Exceptionexception,504 double? percentage, 505 string exception, 513 506 bool finished) { 514 507 … … 522 515 if (job != null) { 523 516 job.JobInfo = DaoLocator.JobDao.FindById(jobId); 524 job.JobInfo.Client = job.JobInfo.Client = DaoLocator.ClientDao.GetClientForJob(jobId); 525 } 526 527 if (job == null && job.JobInfo != null) { 517 if (job.JobInfo != null) { 518 job.JobInfo.Client = job.JobInfo.Client = DaoLocator.ClientDao.GetClientForJob(jobId); 519 } 520 } 521 522 if (job != null && job.JobInfo == null) { 528 523 response.Success = false; 529 524 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOB_WITH_THIS_ID; … … 591 586 job.JobInfo.Percentage = percentage; 592 587 593 if ( exception != null) {588 if (!string.IsNullOrEmpty(exception)) { 594 589 job.JobInfo.State = State.Failed; 595 job.JobInfo.Exception = exception .ToString();590 job.JobInfo.Exception = exception; 596 591 job.JobInfo.DateFinished = DateTime.Now; 597 592 } else if (finished) { … … 629 624 byte[] result, 630 625 double percentage, 631 Exceptionexception) {626 string exception) { 632 627 633 628 return ProcessJobResult(clientId, jobId, result, percentage, exception, true); 634 629 } 635 630 636 public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, Exceptionexception) {631 public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, string exception) { 637 632 return ProcessJobResult(clientId, jobId, result, percentage, exception, false); 638 633 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs
r4107 r4170 67 67 } 68 68 69 public ResponseResultReceived StoreFinishedJobResult(Guid clientId, Guid jobId, byte[] result, double percentage, Exceptionexception) {69 public ResponseResultReceived StoreFinishedJobResult(Guid clientId, Guid jobId, byte[] result, double percentage, string exception) { 70 70 using (contextFactory.GetContext()) { 71 71 return clientCommunicator.StoreFinishedJobResult(clientId, jobId, result, percentage, exception); … … 89 89 } 90 90 91 public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, Exceptionexception) {91 public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, string exception) { 92 92 using (contextFactory.GetContext()) { 93 93 return clientCommunicator.ProcessSnapshot(clientId, jobId, result, percentage, exception); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ExecutionEngineFacade.cs
r4137 r4170 75 75 } 76 76 } 77 78 79 public ResponseObject<JobResultList> GetAllJobResults(IEnumerable<Guid> jobIds) { 80 using (contextFactory.GetContext(false)) { 81 return jobManager.GetAllJobResults(jobIds); 82 } 83 } 77 84 #endregion 85 86 78 87 } 79 88 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs
r4137 r4170 154 154 } 155 155 156 public Response List<JobResult> GetAllJobResults(Guid jobId) {157 using (contextFactory.GetContext(false)) { 158 secMan.Authorize("AccessJobResults", sessionID, jobId);159 return jobManager.GetAllJobResults(jobId );156 public ResponseObject<JobResultList> GetAllJobResults(IEnumerable<Guid> jobIds) { 157 using (contextFactory.GetContext(false)) { 158 //secMan.Authorize("AccessJobResults", sessionID, jobId); skip authorization 159 return jobManager.GetAllJobResults(jobIds); 160 160 } 161 161 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/HeuristicLab.Hive.Server.Core-3.3.csproj
r4133 r4170 165 165 </ItemGroup> 166 166 <ItemGroup> 167 <WCFMetadata Include="Service References\" />168 </ItemGroup>169 <ItemGroup>170 167 <ProjectReference Include="..\..\HeuristicLab.DataAccess\3.3\HeuristicLab.DataAccess-3.3.csproj"> 171 168 <Project>{9076697B-C151-46CD-95BC-1D059492B478}</Project> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs
r4121 r4170 320 320 } 321 321 322 public ResponseList<JobResult> GetAllJobResults(Guid jobId) { 323 return new ResponseList<JobResult>(); 322 public ResponseObject<JobResultList> GetAllJobResults(IEnumerable<Guid> jobIds) { 323 ResponseObject<JobResultList> response = new ResponseObject<JobResultList>(); 324 JobResultList jobResultList = new JobResultList(); 325 IEnumerable<JobDto> jobs = DaoLocator.JobDao.FindJobsById(jobIds); 326 foreach (JobDto job in jobs) { 327 jobResultList.Add(new JobResult() { 328 JobId = job.Id, 329 State = job.State, 330 DateCalculated = job.DateCalculated, 331 DateFinished = job.DateFinished, 332 Exception = job.Exception, 333 Percentage = job.Percentage 334 }); 335 } 336 response.Obj = jobResultList; 337 response.Success = true; 338 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_ALL_JOBS; 339 return response; 324 340 } 325 341
Note: See TracChangeset
for help on using the changeset viewer.