Changeset 6100
- Timestamp:
- 05/02/11 17:56:52 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4
- Files:
-
- 2 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 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs
r6004 r6100 98 98 SendHeartbeatForExecutor = false; 99 99 if (Job == null) { 100 SlaveClientCom.Instance.ClientCom.LogMessage("Pausing job: Job is null");100 currentException = new Exception("Pausing job " + this.JobId + ": Job is null"); 101 101 Core.EnqueueExecutorMessage(Core.KillAppDomain, JobId); 102 102 } … … 109 109 } 110 110 catch (Exception ex) { 111 SlaveClientCom.Instance.ClientCom.LogMessage("Error pausing job:" + ex.ToString());111 currentException = new Exception("Error pausing job " + this.JobId + ": " + ex.ToString()); 112 112 } 113 113 } … … 117 117 SendHeartbeatForExecutor = false; 118 118 if (Job == null) { 119 SlaveClientCom.Instance.ClientCom.LogMessage("Stopping job: Job is null");119 currentException = new Exception("Stopping job " + this.JobId + ": Job is null"); 120 120 Core.EnqueueExecutorMessage(Core.KillAppDomain, JobId); 121 121 } … … 128 128 } 129 129 catch (Exception ex) { 130 SlaveClientCom.Instance.ClientCom.LogMessage("Error stopping job:" + ex.ToString());130 currentException = new Exception("Error stopping job " + this.JobId + ": " + ex.ToString()); 131 131 } 132 132 } … … 207 207 public JobData GetFinishedJob() { 208 208 if (Job == null) { 209 SlaveClientCom.Instance.ClientCom.LogMessage("Getting finished job: Job is null"); 209 if (currentException == null) { 210 currentException = new Exception("Getting finished job " + this.JobId + ": Job is null"); 211 } 210 212 Core.EnqueueExecutorMessage(Core.KillAppDomain, JobId); 211 213 } … … 218 220 } 219 221 catch (Exception ex) { 220 SlaveClientCom.Instance.ClientCom.LogMessage("Error stopping job:" + ex.ToString());222 currentException = new Exception("Error getting finished job " + this.JobId + ": " + ex.ToString()); 221 223 } 222 224 }
Note: See TracChangeset
for help on using the changeset viewer.