Changeset 6199
- Timestamp:
- 05/15/11 14:33:42 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/RefreshableHiveExperiment.cs
r6198 r6199 101 101 set { log = value; } 102 102 } 103 private static object logLocker = new object(); 103 104 104 105 … … 188 189 189 190 if (!hiveJob.IsFinishedJobDownloaded && !hiveJob.IsDownloading && hiveJob.Job.LastJobDataUpdate < lightweightJob.LastJobDataUpdate) { 190 log.LogMessage(string.Format("Downloading job {0}", lightweightJob.Id));191 LogMessage(string.Format("Downloading job {0}", lightweightJob.Id)); 191 192 hiveJob.IsDownloading = true; 192 193 jobDownloader.DownloadJob(hiveJob.Job, (localJob, itemJob, exception) => { 193 log.LogMessage(string.Format("Finished downloading job {0}", localJob.Id));194 LogMessage(string.Format("Finished downloading job {0}", localJob.Id)); 194 195 HiveJob localHiveJob = GetHiveJobById(localJob.Id); 195 196 196 197 if (exception != null) { 197 log.LogException(exception); 198 var ex = new ConcurrentJobDownloaderException("Downloading job failed.", exception); 199 LogException(ex); 198 200 localHiveJob.IsDownloading = false; 199 throw new ConcurrentJobDownloaderException("Downloading job failed.", exception);201 throw ex; 200 202 } 201 203 … … 232 234 } 233 235 236 // synchronized logging 237 private void LogException(Exception exception) { 238 lock (logLocker) { 239 log.LogException(exception); 240 } 241 } 242 // synchronized logging 243 private void LogMessage(string message) { 244 lock (logLocker) { 245 log.LogMessage(message); 246 } 247 } 248 234 249 public HiveJob GetHiveJobById(Guid jobId) { 235 250 foreach (HiveJob job in hiveExperiment.HiveJobs) {
Note: See TracChangeset
for help on using the changeset viewer.