Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/31/11 10:35:57 (13 years ago)
Author:
cneumuel
Message:

#1260

  • fixed wiring of textboxes in HiveExperimentManager
  • robustified results polling in HiveExperimentManager
  • robustified HiveEngine
Location:
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperimentList.cs

    r4760 r5399  
    2626
    2727namespace HeuristicLab.Hive.ExperimentManager {
    28   [Item("HiveExperiment List", "Represents a list of hive experiments.")]
     28  [Item("HiveExperiment Collection", "Represents a list of hive experiments.")]
    2929  [StorableClass]
    30   public class HiveExperimentList : ItemList<HiveExperiment> {
    31     public HiveExperimentList() : base() { }
    32     public HiveExperimentList(int capacity) : base(capacity) { }
    33     public HiveExperimentList(IEnumerable<HiveExperiment> collection) : base(collection) { }
     30  public class HiveExperimentCollection : ItemCollection<HiveExperiment> {
     31    public HiveExperimentCollection() : base() { }
     32    public HiveExperimentCollection(int capacity) : base(capacity) { }
     33    public HiveExperimentCollection(IEnumerable<HiveExperiment> collection) : base(collection) { }
    3434
    3535    [StorableConstructor]
    36     protected HiveExperimentList(bool deserializing) : base(deserializing) { }
    37     protected HiveExperimentList(HiveExperimentList original, Cloner cloner)
     36    protected HiveExperimentCollection(bool deserializing) : base(deserializing) { }
     37    protected HiveExperimentCollection(HiveExperimentCollection original, Cloner cloner)
    3838      : base(original, cloner) {
    3939    }
    4040    public override IDeepCloneable Clone(Cloner cloner) {
    41       return new HiveExperimentList(this, cloner);
     41      return new HiveExperimentCollection(this, cloner);
    4242    }
    4343  }
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperimentManager.cs

    r4914 r5399  
    4242    }
    4343
    44     private HiveExperimentList hiveExperiments;
    45     public HiveExperimentList HiveExperiments {
     44    private HiveExperimentCollection hiveExperiments;
     45    public HiveExperimentCollection HiveExperiments {
    4646      get { return hiveExperiments; }
    4747      set {
     
    7373    private void RegisterHiveExperimentsEvent() {
    7474      if (hiveExperiments != null) {
    75         hiveExperiments.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<HiveExperiment>>(hiveExperiments_ItemsRemoved);
     75        hiveExperiments.ItemsRemoved += new CollectionItemsChangedEventHandler<HiveExperiment>(hiveExperiments_ItemsRemoved);
    7676      }
    7777    }
     
    7979    private void DeRegisterHiveExperimentsEvents() {
    8080      if (hiveExperiments != null) {
    81         hiveExperiments.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<HiveExperiment>>(hiveExperiments_ItemsRemoved);
     81        hiveExperiments.ItemsRemoved -= new CollectionItemsChangedEventHandler<HiveExperiment>(hiveExperiments_ItemsRemoved);
    8282      }
    8383    }
     
    100100        IsProgressing = true;
    101101        if (this.HiveExperiments == null) {
    102           this.HiveExperiments = new HiveExperimentList();
     102          this.HiveExperiments = new HiveExperimentCollection();
    103103        }
    104104        using (Disposable<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
     
    149149    }
    150150
    151     void hiveExperiments_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<HiveExperiment>> e) {
     151    void hiveExperiments_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<HiveExperiment> e) {
    152152      if (!currentlyUpdating) {
    153153        using (Disposable<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
    154           foreach (IndexedItem<HiveExperiment> item in e.Items) {
    155             if (item.Value.HiveExperimentId != Guid.Empty) {
    156               service.Obj.DeleteHiveExperiment(item.Value.HiveExperimentId);
     154          foreach (HiveExperiment item in e.Items) {
     155            if (item.HiveExperimentId != Guid.Empty) {
     156              service.Obj.DeleteHiveExperiment(item.HiveExperimentId);
    157157            }
    158158          }
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/JobResultPoller.cs

    r4914 r5399  
    9292      catch (Exception e) {
    9393        OnExceptionOccured(e);
     94        IsPolling = false;
    9495      }
    9596    }
    9697
    9798    private void FetchJobResults() {
    98       ResponseObject<JobResultList> response;
    99       using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
    100         response = service.Obj.GetChildJobResults(hiveJob.JobDto.Id, true, true);
     99      int repetitions = 5;
     100      ResponseObject<JobResultList> response = null;
     101      while (response == null && repetitions > 0) {
     102        repetitions--;
     103        try {
     104          using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
     105            response = service.Obj.GetChildJobResults(hiveJob.JobDto.Id, true, true);
     106          }
     107        }
     108        catch (Exception e) {
     109          if (repetitions == 0)
     110            throw e;
     111        }
    101112      }
    102113      if (response.StatusMessage == ResponseStatus.Ok) {
Note: See TracChangeset for help on using the changeset viewer.