- Timestamp:
- 06/05/09 14:40:53 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Core/3.2/JobStorage/JobStorageManager.cs
r1959 r2025 47 47 String filename = storedJobsList[index-1].ServerIP + "." + storedJobsList[index-1].ServerPort + "." + storedJobsList[index-1].JobID.ToString(); 48 48 Logging.Instance.Info("JobStorrageManager", "Sending stored job " + storedJobsList[index - 1].JobID + " to the server"); 49 byte[] job = File.ReadAllBytes(path + filename + ".dat"); 50 51 if (WcfService.Instance.IsJobStillNeeded(storedJobsList[index - 1].JobID).StatusMessage == ApplicationConstants.RESPONSE_COMMUNICATOR_SEND_JOBRESULT) { 52 ResponseResultReceived res = WcfService.Instance.SendStoredJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, storedJobsList[index - 1].JobID, job, 1.00, null, true); 53 if (!res.Success) 54 Logging.Instance.Error("JobStorageManager", "sending of job failed: " + res.StatusMessage); 55 else 56 Logging.Instance.Info("JobStorrageManager", "Sending of job " + storedJobsList[index - 1].JobID + " done"); 49 try { 50 byte[] job = File.ReadAllBytes(path + filename + ".dat"); 51 if (WcfService.Instance.IsJobStillNeeded(storedJobsList[index - 1].JobID).StatusMessage == ApplicationConstants.RESPONSE_COMMUNICATOR_SEND_JOBRESULT) { 52 ResponseResultReceived res = WcfService.Instance.SendStoredJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, storedJobsList[index - 1].JobID, job, 1.00, null, true); 53 if (!res.Success) 54 Logging.Instance.Error("JobStorageManager", "sending of job failed: " + res.StatusMessage); 55 else 56 Logging.Instance.Info("JobStorrageManager", "Sending of job " + storedJobsList[index - 1].JobID + " done"); 57 } 58 ClientStatusInfo.JobsProcessed++; 59 storedJobsList.Remove(storedJobsList[index - 1]); 60 File.Delete(path + filename + ".dat"); 57 61 } 58 ClientStatusInfo.JobsProcessed++; 59 60 61 62 storedJobsList.Remove(storedJobsList[index - 1]); 63 File.Delete(path + filename + ".dat"); 62 catch (Exception e) { 63 Logging.Instance.Error("JobStorrageManager", "Job not on hdd but on list - deleting job from list", e); 64 storedJobsList.Remove(storedJobsList[index - 1]); 64 65 } 66 67 } 65 68 } 66 69 }
Note: See TracChangeset
for help on using the changeset viewer.