Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/13/10 14:13:15 (14 years ago)
Author:
cneumuel
Message:

#1260

  • moved all state-information into lifecycleManager
  • changed isolation level for transactions to ReadCommited
  • made currentlyFetching-status on slave more rubust
  • made LogServiceReader more rubust
Location:
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/HeuristicLab.Hive.Slave.Console-3.3.csproj

    r5054 r5093  
    7979  </PropertyGroup>
    8080  <ItemGroup>
     81    <Reference Include="HeuristicLab.Clients.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     82      <HintPath>..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Clients.Common-3.3.dll</HintPath>
     83    </Reference>
    8184    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    8285      <HintPath>..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
     
    204207      <Project>{134F93D7-E7C8-4ECD-9923-7F63259A60D8}</Project>
    205208      <Name>HeuristicLab.Hive.Contracts-3.3</Name>
     209    </ProjectReference>
     210    <ProjectReference Include="..\..\HeuristicLab.Hive.Slave.Core\3.3\HeuristicLab.Hive.Slave.Core-3.3.csproj">
     211      <Project>{5010BD86-23B7-4F8C-888A-76D21AD5266A}</Project>
     212      <Name>HeuristicLab.Hive.Slave.Core-3.3</Name>
    206213    </ProjectReference>
    207214  </ItemGroup>
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/LogServiceReader.cs

    r5037 r5093  
    66using HeuristicLab.Core;
    77using HeuristicLab.Hive.Slave.Console.SlaveConsoleService;
     8using HeuristicLab.Clients.Common;
    89
    910namespace HeuristicLab.Hive.Slave.Console {
     
    2526    void timer_Tick(object sender, EventArgs e) {
    2627      try {
    27         using (var slaveClient = new SlaveConsoleCommunicatorClient()) {
    28           var messages = slaveClient.GetLogMessages();
    29           if (messages.Count < messageCount) {
    30             messageCount = 0; // log got cleared
     28        using (var slaveClient = ClientFactory.CreateClient<ISlaveConsoleCommunicator>("SlaveConsoleTcpEndpointClient")) {
     29          try {
     30            var messages = slaveClient.Obj.GetLogMessages();
     31            if (messages.Count < messageCount) {
     32              messageCount = 0; // log got cleared
     33            }
     34            var newMessages = messages.GetRange(messageCount, messages.Count - messageCount);
     35            messageCount = messages.Count;
     36            OnMoreData(newMessages);
     37
    3138          }
    32           var newMessages = messages.GetRange(messageCount, messages.Count - messageCount);
    33           messageCount = messages.Count;
    34           OnMoreData(newMessages);
     39          catch (Exception ex) {
     40            OnMoreData(new List<string> { "Error fetching log: " + ex.ToString() });
     41          }
    3542        }
    3643      }
    3744      catch (Exception ex) {
    38         OnMoreData(new List<string> { "Error fetching log: " + ex.ToString() });
     45        OnMoreData(new List<string> { "Error in slave-communication: " + ex.ToString() });
    3946      }
    4047    }
     
    4855      var handler = MoreData;
    4956      var newData = string.Join(Environment.NewLine, newMessages.ToArray());
    50       if(newMessages.Count() > 0) newData += Environment.NewLine;
     57      if (newMessages.Count() > 0) newData += Environment.NewLine;
    5158      if (handler != null) MoreData(this, newData);
    5259    }
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/app.config

    r4914 r5093  
    1616    <bindings>
    1717      <netTcpBinding>
    18         <binding name="SlaveConsoleTcpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="65536" maxReceivedMessageSize="104857600">
    19           <readerQuotas maxDepth="32" maxStringContentLength="104857600" maxArrayLength="104857600" maxBytesPerRead="104857600" maxNameTableCharCount="104857600"/>
     18        <binding name="SlaveConsoleTcpEndpointBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="104857600" maxBufferSize="104857600" maxReceivedMessageSize="104857600">
     19          <readerQuotas maxDepth="320" maxStringContentLength="104857600" maxArrayLength="104857600" maxBytesPerRead="104857600" maxNameTableCharCount="104857600"/>
    2020          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
    2121          <security mode="None">
     
    2727    </bindings>
    2828    <client>
    29       <endpoint address="net.tcp://localhost:8000/SlaveConsoleService" binding="netTcpBinding" bindingConfiguration="SlaveConsoleTcpEndpoint" contract="SlaveConsoleService.ISlaveConsoleCommunicator" name="SlaveConsoleTcpEndpoint"/>
     29      <endpoint address="net.tcp://localhost:8000/SlaveConsoleService" binding="netTcpBinding" bindingConfiguration="SlaveConsoleTcpEndpointBinding" contract="SlaveConsoleService.ISlaveConsoleCommunicator" name="SlaveConsoleTcpEndpointClient"/>
    3030    </client>
    3131  </system.serviceModel>
Note: See TracChangeset for help on using the changeset viewer.