Changeset 4263 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3
- Timestamp:
- 08/19/10 12:41:05 (14 years ago)
- Location:
- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/ConfigurationManager/UptimeManager.cs
r4254 r4263 10 10 using HeuristicLab.Hive.Contracts; 11 11 using HeuristicLab.Tracing; 12 using HeuristicLab.Hive.Contracts.ResponseObjects; 12 13 13 14 namespace HeuristicLab.Hive.Slave.Core.ConfigurationManager { -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs
r4254 r4263 47 47 using HeuristicLab.Core; 48 48 using System.IO; 49 using HeuristicLab.Hive.Contracts.ResponseObjects; 49 50 50 51 namespace HeuristicLab.Hive.Slave.Core { … … 88 89 wcfService = WcfService.Instance; 89 90 wcfService.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(wcfService_LoginCompleted); 90 wcfService. SendJobCompleted += new EventHandler<GetJobCompletedEventArgs>(wcfService_GetJobCompleted);91 wcfService. StoreFinishedJobResultCompleted += new EventHandler<StoreFinishedJobResultCompletedEventArgs>(wcfService_StoreFinishedJobResultCompleted);91 wcfService.GetJobCompleted += new EventHandler<GetJobCompletedEventArgs>(wcfService_GetJobCompleted); 92 wcfService.GetFinishedJobResultCompleted += new EventHandler<StoreFinishedJobResultCompletedEventArgs>(wcfService_StoreFinishedJobResultCompleted); 92 93 wcfService.ProcessSnapshotCompleted += new EventHandler<ProcessSnapshotCompletedEventArgs>(wcfService_ProcessSnapshotCompleted); 93 94 wcfService.ConnectionRestored += new EventHandler(wcfService_ConnectionRestored); … … 153 154 case MessageContainer.MessageType.FetchJob: 154 155 if (!CurrentlyFetching) { 155 wcfService. SendJobAsync(ConfigManager.Instance.GetClientInfo().Id);156 wcfService.GetJobAsync(ConfigManager.Instance.GetClientInfo().Id); 156 157 CurrentlyFetching = true; 157 158 } else … … 232 233 if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin) { 233 234 Logger.Info("Sending the finished job with id: " + jId); 234 wcfService. StoreFinishedJobResultAsync(ConfigManager.Instance.GetClientInfo().Id, jId, sJob, 1.0, engines[jId].CurrentException, true);235 wcfService.GetFinishedJobResultAsync(ConfigManager.Instance.GetClientInfo().Id, jId, sJob, 1.0, engines[jId].CurrentException, true); 235 236 } else { 236 237 Logger.Info("Storing the finished job with id: " + jId + " to hdd"); … … 286 287 /// <param name="e"></param> 287 288 void wcfService_LoginCompleted(object sender, LoginCompletedEventArgs e) { 288 if (e.Result.S uccess) {289 if (e.Result.StatusMessage == ResponseStatus.Ok) { 289 290 CurrentlyFetching = false; 290 291 Logger.Info("Login completed to Hive Server @ " + DateTime.Now); 291 292 } else 292 Logger.Error("Error during login: " + e.Result.StatusMessage );293 Logger.Error("Error during login: " + e.Result.StatusMessage.ToString()); 293 294 } 294 295 … … 299 300 /// <param name="e"></param> 300 301 void wcfService_GetJobCompleted(object sender, GetJobCompletedEventArgs e) { 301 if (e.Result.StatusMessage != ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT) {302 if (e.Result.StatusMessage != ResponseStatus.GetJob_NoJobsAvailable) { 302 303 Logger.Info("Received new job with id " + e.Result.Obj.Id); 303 304 bool sandboxed = false; … … 355 356 Logger.Info("Job submitted with id " + e.Result.JobId); 356 357 KillAppDomain(e.Result.JobId); 357 if (e.Result.S uccess) {358 if (e.Result.StatusMessage == ResponseStatus.Ok) { 358 359 SlaveStatusInfo.JobsProcessed++; 359 360 Logger.Info("Increased ProcessedJobs to:" + SlaveStatusInfo.JobsProcessed); … … 415 416 private void FetchCalendarFromServer() { 416 417 ResponseCalendar calres = wcfService.GetCalendarSync(ConfigManager.Instance.GetClientInfo().Id); 417 if (calres.S uccess) {418 if (calres.StatusMessage == ResponseStatus.Ok) { 418 419 if (UptimeManager.Instance.SetAppointments(false, calres)) { 419 420 Logger.Info("Remote calendar installed"); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/JobStorage/JobStorageManager.cs
r4254 r4263 12 12 using System.Xml; 13 13 using HeuristicLab.Tracing; 14 using HeuristicLab.Hive.Contracts.ResponseObjects; 14 15 15 16 namespace HeuristicLab.Hive.Slave.Core.JobStorage { … … 49 50 try { 50 51 byte[] job = File.ReadAllBytes(path + filename + ".dat"); 51 if (WcfService.Instance.IsJobStillNeeded(storedJobsList[index - 1].JobID).StatusMessage == ApplicationConstants.RESPONSE_COMMUNICATOR_SEND_JOBRESULT) {52 if (WcfService.Instance.IsJobStillNeeded(storedJobsList[index - 1].JobID).StatusMessage == ResponseStatus.Ok) { 52 53 ResponseResultReceived res = WcfService.Instance.StoreFinishedJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, storedJobsList[index - 1].JobID, job, 1.00, null, true); 53 if (!res.Success) 54 Logger.Error("sending of job failed: " + res.StatusMessage); 55 else 56 Logger.Info("Sending of job " + storedJobsList[index - 1].JobID + " done"); 54 Logger.Info("Sending of job " + storedJobsList[index - 1].JobID + " done"); 57 55 } 58 56 SlaveStatusInfo.JobsProcessed++;
Note: See TracChangeset
for help on using the changeset viewer.