Changeset 6994


Ignore:
Timestamp:
11/14/11 22:44:16 (8 years ago)
Author:
ascheibe
Message:

#1672

  • removed dead code
  • added Hive assembly references to Tests project
  • fixed problems found by tests
Location:
trunk/sources
Files:
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.Designer.cs

    r6976 r6994  
    237237      this.Name = "ResourcesView";
    238238      this.Size = new System.Drawing.Size(853, 553);
     239      this.Load += new System.EventHandler(this.ResourcesView_Load);
    239240      this.splitSlaves.Panel1.ResumeLayout(false);
    240241      this.splitSlaves.Panel2.ResumeLayout(false);
  • trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs

    r6976 r6994  
    5656      HiveAdminClient.Instance.Refreshing += new EventHandler(Instance_Refreshing);
    5757      HiveAdminClient.Instance.Refreshed += new EventHandler(Instance_Refreshed);
    58 
    59       UpdateResourcesAsync();
    6058    }
    6159
     
    400398      UpdateResourcesAsync();
    401399    }
     400
     401    private void ResourcesView_Load(object sender, EventArgs e) {
     402      UpdateResourcesAsync();
     403    }
    402404  }
    403405}
  • trunk/sources/HeuristicLab.Clients.Hive.Slave/3.3/Core.cs

    r6983 r6994  
    149149      clientCom.LogMessage(string.Format("Message: {0} for task: {1} ", container.Message.ToString(), container.TaskId));
    150150
    151       if (container is ExecutorMessageContainer<Guid>) {
    152         ExecutorMessageContainer<Guid> c = (ExecutorMessageContainer<Guid>)container;
    153         c.execute();
    154       } else if (container is MessageContainer) {
    155         switch (container.Message) {
    156           case MessageContainer.MessageType.CalculateTask:
    157             CalculateTaskAsync(container.TaskId);
    158             break;
    159           case MessageContainer.MessageType.AbortTask:
    160             AbortTaskAsync(container.TaskId);
    161             break;
    162           case MessageContainer.MessageType.StopTask:
    163             StopTaskAsync(container.TaskId);
    164             break;
    165           case MessageContainer.MessageType.PauseTask:
    166             PauseTaskAsync(container.TaskId);
    167             break;
    168           case MessageContainer.MessageType.StopAll:
    169             DoStopAll();
    170             break;
    171           case MessageContainer.MessageType.PauseAll:
    172             DoPauseAll();
    173             break;
    174           case MessageContainer.MessageType.AbortAll:
    175             DoAbortAll();
    176             break;
    177           case MessageContainer.MessageType.ShutdownSlave:
    178             ShutdownCore();
    179             break;
    180           case MessageContainer.MessageType.Restart:
    181             DoStartSlave();
    182             break;
    183           case MessageContainer.MessageType.Sleep:
    184             Sleep();
    185             break;
    186           case MessageContainer.MessageType.SayHello:
    187             wcfService.Connect(configManager.GetClientInfo());
    188             break;
    189           case MessageContainer.MessageType.NewHBInterval:
    190             int interval = wcfService.GetNewHeartbeatInterval(ConfigManager.Instance.GetClientInfo().Id);
    191             if (interval != -1) {
    192               HeartbeatManager.Interval = TimeSpan.FromSeconds(interval);
    193             }
    194             break;
    195         }
    196       } else {
    197         clientCom.LogMessage("Unknown MessageContainer: " + container);
     151      switch (container.Message) {
     152        case MessageContainer.MessageType.CalculateTask:
     153          CalculateTaskAsync(container.TaskId);
     154          break;
     155        case MessageContainer.MessageType.AbortTask:
     156          AbortTaskAsync(container.TaskId);
     157          break;
     158        case MessageContainer.MessageType.StopTask:
     159          StopTaskAsync(container.TaskId);
     160          break;
     161        case MessageContainer.MessageType.PauseTask:
     162          PauseTaskAsync(container.TaskId);
     163          break;
     164        case MessageContainer.MessageType.StopAll:
     165          DoStopAll();
     166          break;
     167        case MessageContainer.MessageType.PauseAll:
     168          DoPauseAll();
     169          break;
     170        case MessageContainer.MessageType.AbortAll:
     171          DoAbortAll();
     172          break;
     173        case MessageContainer.MessageType.ShutdownSlave:
     174          ShutdownCore();
     175          break;
     176        case MessageContainer.MessageType.Restart:
     177          DoStartSlave();
     178          break;
     179        case MessageContainer.MessageType.Sleep:
     180          Sleep();
     181          break;
     182        case MessageContainer.MessageType.SayHello:
     183          wcfService.Connect(configManager.GetClientInfo());
     184          break;
     185        case MessageContainer.MessageType.NewHBInterval:
     186          int interval = wcfService.GetNewHeartbeatInterval(ConfigManager.Instance.GetClientInfo().Id);
     187          if (interval != -1) {
     188            HeartbeatManager.Interval = TimeSpan.FromSeconds(interval);
     189          }
     190          break;
    198191      }
    199192    }
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HeuristicLab.Clients.Hive-3.3.csproj

    r6976 r6994  
    144144    <Compile Include="ServiceClients\Slave.cs" />
    145145    <Compile Include="ServiceClients\LightweightTask.cs" />
    146     <Compile Include="ServiceClients\ExecutorMessageContainer.cs" />
    147146    <Compile Include="ServiceClients\MessageContainer.cs" />
    148147    <Compile Include="ServiceClients\HiveServiceClient.cs" />
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs/HiveTask.cs

    r6976 r6994  
    153153
    154154    #region Constructors and Cloning
     155    [StorableConstructor]
     156    protected HiveTask(bool deserializing) { }
     157
    155158    public HiveTask() {
    156159      this.Task = new Task() { CoresNeeded = 1, MemoryNeeded = 0 };
     
    515518    #region Constructors and Cloning
    516519    public HiveTask() : base() { }
     520    [StorableConstructor]
     521    protected HiveTask(bool deserializing) { }
    517522    public HiveTask(T itemJob) : base(itemJob, true) { }
    518     protected HiveTask(HiveTask original, Cloner cloner)
     523    protected HiveTask(HiveTask<T> original, Cloner cloner)
    519524      : base(original, cloner) {
    520525    }
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/RefreshableJob.cs

    r6976 r6994  
    208208    protected RefreshableJob(RefreshableJob original, Cloner cloner) {
    209209      cloner.RegisterClonedObject(original, this);
    210       this.Job = original.Job;
     210      this.Job = cloner.Clone(original.Job);
    211211      this.IsControllable = original.IsControllable;
    212212      this.log = cloner.Clone(original.log);
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/ServiceClients/JobData.cs

    r6976 r6994  
    2929    protected TaskData(TaskData original, Cloner cloner) {
    3030      cloner.RegisterClonedObject(original, this);
    31       if (original.Data != null) this.Data = new byte[original.Data.Length]; Array.Copy(original.Data, this.Data, original.Data.Length);
     31      if (original.Data != null) {
     32        this.Data = new byte[original.Data.Length];
     33        Array.Copy(original.Data, this.Data, original.Data.Length);
     34      }
    3235      this.LastUpdate = original.LastUpdate;
    3336    }
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/ServiceClients/PluginData.cs

    r6976 r6994  
    3131    protected PluginData(PluginData original, Cloner cloner)
    3232      : base(original, cloner) {
    33       if (original.Data != null)
     33      if (original.Data != null) {
    3434        this.Data = new byte[original.Data.Length];
    35       Array.Copy(original.Data, this.Data, original.Data.Length);
     35        Array.Copy(original.Data, this.Data, original.Data.Length);
     36      }
    3637      this.FileName = original.FileName;
    3738      this.PluginId = original.PluginId;
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/ServiceClients/Task.cs

    r6976 r6994  
    3434      this.CoresNeeded = original.CoresNeeded;
    3535      this.MemoryNeeded = original.MemoryNeeded;
    36       this.PluginsNeededIds = new List<Guid>(original.PluginsNeededIds);
     36      if (original.PluginsNeededIds != null) {
     37        this.PluginsNeededIds = new List<Guid>(original.PluginsNeededIds);
     38      }
    3739      this.LastHeartbeat = original.LastHeartbeat;
    3840      this.IsParentTask = original.IsParentTask;
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj

    r6919 r6994  
    626626      <Name>HeuristicLab.Clients.Common-3.3</Name>
    627627    </ProjectReference>
     628    <ProjectReference Include="..\HeuristicLab.Clients.Hive.Administrator\3.3\HeuristicLab.Clients.Hive.Administrator-3.3.csproj">
     629      <Project>{5211F1AD-BBA2-4C62-8749-DCA0A25CF5D8}</Project>
     630      <Name>HeuristicLab.Clients.Hive.Administrator-3.3</Name>
     631    </ProjectReference>
     632    <ProjectReference Include="..\HeuristicLab.Clients.Hive.JobManager\3.3\HeuristicLab.Clients.Hive.JobManager-3.3.csproj">
     633      <Project>{DBFD7205-61AF-40EF-8776-3052DEF91CF3}</Project>
     634      <Name>HeuristicLab.Clients.Hive.JobManager-3.3</Name>
     635    </ProjectReference>
     636    <ProjectReference Include="..\HeuristicLab.Clients.Hive.Views\3.3\HeuristicLab.Clients.Hive.Views-3.3.csproj">
     637      <Project>{E1D6C801-892A-406A-B606-F158E36DD3C3}</Project>
     638      <Name>HeuristicLab.Clients.Hive.Views-3.3</Name>
     639    </ProjectReference>
     640    <ProjectReference Include="..\HeuristicLab.Clients.Hive\3.3\HeuristicLab.Clients.Hive-3.3.csproj">
     641      <Project>{B5EF1E5A-9F3D-40B9-B4B0-30AADF2E2CEB}</Project>
     642      <Name>HeuristicLab.Clients.Hive-3.3</Name>
     643    </ProjectReference>
    628644    <ProjectReference Include="..\HeuristicLab.CodeEditor\3.3\HeuristicLab.CodeEditor-3.3.csproj">
    629645      <Project>{489CFE09-FDF7-4C89-BAB5-BD09CADD61AD}</Project>
     
    689705      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
    690706      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
     707    </ProjectReference>
     708    <ProjectReference Include="..\HeuristicLab.Hive\3.3\HeuristicLab.Hive-3.3.csproj">
     709      <Project>{F98A1740-9AC9-4D36-A582-6A2D0D06978D}</Project>
     710      <Name>HeuristicLab.Hive-3.3</Name>
    691711    </ProjectReference>
    692712    <ProjectReference Include="..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
Note: See TracChangeset for help on using the changeset viewer.