- Timestamp:
- 05/06/13 12:30:18 (11 years ago)
- Location:
- branches/HivePerformance/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HivePerformance/sources
- Property svn:mergeinfo changed
/trunk/sources (added) merged: 9376,9379,9388,9390,9396,9402-9410,9413,9417,9426-9429,9432-9433,9435-9439,9441-9443
- Property svn:mergeinfo changed
-
branches/HivePerformance/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs
r9219 r9444 113 113 114 114 foreach (var j in jobsLoaded) { 115 jobs.Add(new RefreshableJob(j) { IsAllowedPrivileged = this.isAllowedPrivileged });115 jobs.Add(new RefreshableJob(j)); 116 116 } 117 117 } … … 452 452 IDictionary<Guid, HiveTask> allHiveTasks = downloader.Results; 453 453 var parents = allHiveTasks.Values.Where(x => !x.Task.ParentTaskId.HasValue); 454 refreshableJob.Job.IsPrivileged = allHiveTasks.Any(x => x.Value.Task.IsPrivileged); 454 455 455 456 refreshableJob.Progress.Status = "Downloading/deserializing complete. Displaying tasks..."; -
branches/HivePerformance/sources/HeuristicLab.Clients.Hive/3.3/RefreshableJob.cs
r9219 r9444 110 110 } 111 111 } else { 112 StopResultPolling();112 PauseResultPolling(); 113 113 } 114 114 } … … 157 157 } 158 158 159 // may execute jobs with privileged permissions on slaves160 public bool IsAllowedPrivileged {161 get { return Job.IsPrivileged; }162 set {163 if (value != Job.IsPrivileged) {164 Job.IsPrivileged = value;165 OnIsAllowedPrivilegedChanged();166 }167 }168 }169 170 159 private Progress progress; 171 160 public Progress Progress { … … 196 185 this.HiveTasks = new ItemCollection<HiveTask>(); 197 186 } 198 public RefreshableJob(Job hive Experiment) {187 public RefreshableJob(Job hiveJob) { 199 188 this.refreshAutomatically = true; 200 this.Job = hive Experiment;189 this.Job = hiveJob; 201 190 this.log = new ThreadSafeLog(); 202 191 this.jobDownloader = new ConcurrentTaskDownloader<ItemTask>(Settings.Default.MaxParallelDownloads, Settings.Default.MaxParallelDownloads); … … 239 228 public void StopResultPolling() { 240 229 if (jobResultPoller != null && jobResultPoller.IsPolling) { 230 refreshAutomatically = false; 241 231 jobResultPoller.Stop(); 242 232 DeregisterResultPollingEvents(); 233 jobResultPoller = null; 234 } 235 } 236 237 public void PauseResultPolling() { 238 if (jobResultPoller != null && jobResultPoller.IsPolling) { 239 jobResultPoller.Stop(); 243 240 } 244 241 } … … 425 422 } 426 423 427 public event EventHandler IsAllowedPrivilegedChanged;428 private void OnIsAllowedPrivilegedChanged() {429 var handler = IsAllowedPrivilegedChanged;430 if (handler != null) handler(this, EventArgs.Empty);431 }432 433 424 public event EventHandler JobStatisticsChanged; 434 425 private void OnJobStatisticsChanged() { … … 515 506 public event EventHandler HiveTasksChanged; 516 507 protected virtual void OnHiveTasksChanged() { 517 StopResultPolling();518 508 if (this.HiveTasks != null && this.HiveTasks.Count > 0 && this.GetAllHiveTasks().All(x => x.Task.Id != Guid.Empty)) { 519 509 if (IsFinished()) { 520 510 this.ExecutionState = Core.ExecutionState.Stopped; 521 511 this.RefreshAutomatically = false; 522 if (jobResultPoller != null) DeregisterResultPollingEvents();512 StopResultPolling(); 523 513 } else { 524 514 this.RefreshAutomatically = true; -
branches/HivePerformance/sources/HeuristicLab.Clients.Hive/3.3/app.config
r9207 r9444 48 48 maxBufferPoolSize="2147483647" 49 49 maxReceivedMessageSize="2147483647" 50 messageEncoding=" Text"50 messageEncoding="Mtom" 51 51 textEncoding="utf-8" 52 52 useDefaultWebProxy="true"
Note: See TracChangeset
for help on using the changeset viewer.