Changeset 6100 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
- Timestamp:
- 05/02/11 17:56:52 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
r6039 r6100 96 96 catch (Exception) { } 97 97 } else { 98 throw ex; 98 //try to log with clientCom. if this works the user sees at least a message, 99 //else an exception will be thrown anyways. 100 clientCom.LogMessage("Error on startup: " + ex.ToString() + 101 Environment.NewLine + "Core is going to shutdown."); 99 102 } 100 103 } … … 187 190 break; 188 191 case MessageContainer.MessageType.AbortJob: 192 SlaveStatusInfo.JobsAborted++; 189 193 KillAppDomain(container.JobId); 190 194 break; … … 222 226 223 227 try { 228 if (engines[job.Id].CurrentException != string.Empty) { 229 wcfService.UpdateJobState(job.Id, JobState.Failed, engines[job.Id].CurrentException); 230 SlaveStatusInfo.JobsAborted++; 231 } else { 232 SlaveStatusInfo.JobsProcessed++; 233 } 224 234 clientCom.LogMessage("Sending the paused job with id: " + job.Id); 225 235 wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState.Paused); … … 246 256 job.ExecutionTime = engines[job.Id].ExecutionTime; 247 257 258 248 259 try { 260 if (engines[job.Id].CurrentException != string.Empty) { 261 wcfService.UpdateJobState(job.Id, JobState.Failed, engines[job.Id].CurrentException); 262 } 263 SlaveStatusInfo.JobsAborted++; 264 249 265 clientCom.LogMessage("Sending the stoppped job with id: " + job.Id); 250 wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState. Finished);266 wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState.Aborted); 251 267 } 252 268 catch (Exception e) { … … 440 456 441 457 lock (locker) { 442 if (engines.ContainsKey(myJob.Id)) 443 throw new Exception("Job with key " + myJob.Id + " already exists"); 458 if (engines.ContainsKey(myJob.Id)) { 459 clientCom.LogMessage("Job with key " + myJob.Id + " already exists. Job will be ignored."); 460 return; 461 } 444 462 445 463 String pluginDir = Path.Combine(PluginCache.Instance.PluginTempBaseDir, myJob.Id.ToString()); … … 476 494 engine.Start(jobData.Data); 477 495 } 496 478 497 } 479 498 catch (Exception exception) { … … 544 563 repeat--; 545 564 if (repeat == 0) { 565 clientCom.LogMessage("Could not unload AppDomain, shutting down core..."); 546 566 throw; // rethrow and let app crash 547 567 }
Note: See TracChangeset
for help on using the changeset viewer.