Changeset 4368 for branches/3.3-Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs
- Timestamp:
- 09/07/10 10:22:27 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs
r4337 r4368 30 30 using HeuristicLab.Hive.Slave.Common; 31 31 using HeuristicLab.Hive.Slave.Communication; 32 using HeuristicLab.Hive.Slave.Co re.SlaveConsoleService;32 using HeuristicLab.Hive.Slave.Communication.SlaveFacade; 33 33 using HeuristicLab.Hive.Slave.Core.ConfigurationManager; 34 34 using HeuristicLab.Hive.Slave.Core.JobStorage; 35 using HeuristicLab.Hive.Slave.Core.SlaveConsoleService; 35 36 using HeuristicLab.Hive.Slave.ExecutionEngine; 36 37 using HeuristicLab.Tracing; 37 using HeuristicLab.Hive.Slave.Communication.SlaveService;38 38 39 39 namespace HeuristicLab.Hive.Slave.Core { … … 205 205 WcfService.Instance.Logout(ConfigManager.Instance.GetClientInfo().Id); 206 206 break; 207 } 207 208 case MessageContainer.MessageType.AddChildJob: 209 AddChildJob((MessageContainerWithJob)container); 210 break; 211 212 case MessageContainer.MessageType.PauseJob: 213 // send the job back to hive 214 PauseJob((MessageContainerWithJob)container); 215 break; 216 217 case MessageContainer.MessageType.GetChildJobs: 218 // send the job back to hive 219 GetChildJobs((MessageContainerWithCallback<SerializedJobList>)container); 220 break; 221 } 222 } 223 224 private void GetChildJobs(MessageContainerWithCallback<SerializedJobList> mc) { 225 ResponseObject<SerializedJobList> response = wcfService.GetChildJobs(mc.JobId); 226 if (response.StatusMessage != ResponseStatus.Ok) { 227 Logger.Error("GetChildJobs failed: " + response.StatusMessage); 228 } else { 229 mc.Callback(response.Obj); 230 } 231 } 232 233 private void PauseJob(MessageContainerWithJob mc) { 234 ResponseObject<JobDto> response = wcfService.PauseJob(mc.SerializedJob); 235 KillAppDomain(mc.JobId); 236 if (response.StatusMessage != ResponseStatus.Ok) { 237 Logger.Error("PauseJob failed: " + response.StatusMessage); 238 } 239 } 240 241 private ResponseObject<JobDto> AddChildJob(MessageContainerWithJob mc) { 242 ResponseObject<JobDto> response = wcfService.AddChildJob(mc.JobId, mc.SerializedJob); 243 if (response.StatusMessage != ResponseStatus.Ok) { 244 Logger.Error("AddChildJob failed: " + response.StatusMessage); 245 } 246 return response; 208 247 } 209 248 … … 462 501 appDomains.Remove(id); 463 502 } 503 464 504 engines.Remove(id); 465 505 jobs.Remove(id);
Note: See TracChangeset
for help on using the changeset viewer.