Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/20/11 13:54:57 (13 years ago)
Author:
spimming
Message:

#1680:

  • merged changes from trunk into branch

' removed pre-build event for multiple app.configs

Location:
branches/HeuristicLab.Hive.Azure
Files:
2 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive.Azure

  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Core.cs

    r6989 r7215  
    4747    private Semaphore waitShutdownSem = new Semaphore(0, 1);
    4848    private bool abortRequested;
    49     private ISlaveCommunication clientCom;
    5049    private ServiceHost slaveComm;
    5150    private WcfService wcfService;
     
    8685          slaveComm.Open();
    8786        }
    88         clientCom = SlaveClientCom.Instance.ClientCom;
    89 
     87       
    9088        // delete all left over task directories
    9189        pluginManager.CleanPluginTemp();
    92         clientCom.LogMessage("Hive Slave started");
     90        SlaveClientCom.Instance.LogMessage("Hive Slave started");
    9391
    9492        wcfService = WcfService.Instance;
     
    102100          EventLogManager.LogException(ex);
    103101        } else {
    104           //try to log with clientCom. if this works the user sees at least a message,
     102          //try to log with SlaveClientCom.Instance. if this works the user sees at least a message,
    105103          //else an exception will be thrown anyways.
    106           clientCom.LogMessage(string.Format("Uncaught exception: {0} {1} Core is going to shutdown.", ex.ToString(), Environment.NewLine));
     104          SlaveClientCom.Instance.LogMessage(string.Format("Uncaught exception: {0} {1} Core is going to shutdown.", ex.ToString(), Environment.NewLine));
    107105        }
    108106        ShutdownCore();
    109       }
    110       finally {
     107      } finally {
    111108        DeregisterServiceEvents();
    112109        waitShutdownSem.Release();
     
    128125        DetermineAction(container);
    129126        if (!abortRequested) {
    130           clientCom.StatusChanged(configManager.GetStatusForClientConsole());
     127          SlaveClientCom.Instance.StatusChanged(configManager.GetStatusForClientConsole());
    131128        }
    132129      }
     
    144141
    145142    private void WcfService_ExceptionOccured(object sender, EventArgs<Exception> e) {
    146       clientCom.LogMessage(string.Format("Connection to server interruped with exception: {0}", e.Value.Message));
     143      SlaveClientCom.Instance.LogMessage(string.Format("Connection to server interruped with exception: {0}", e.Value.Message));
    147144    }
    148145
    149146    private void WcfService_Connected(object sender, EventArgs e) {
    150       clientCom.LogMessage("Connected successfully to Hive server");
     147      SlaveClientCom.Instance.LogMessage("Connected successfully to Hive server");
    151148    }
    152149
     
    156153    /// <param name="container">The container, containing the message</param>
    157154    private void DetermineAction(MessageContainer container) {
    158       clientCom.LogMessage(string.Format("Message: {0} for task: {1} ", container.Message.ToString(), container.TaskId));
    159 
    160       if (container is ExecutorMessageContainer<Guid>) {
    161         ExecutorMessageContainer<Guid> c = (ExecutorMessageContainer<Guid>)container;
    162         c.execute();
    163       } else if (container is MessageContainer) {
    164         switch (container.Message) {
    165           case MessageContainer.MessageType.CalculateTask:
    166             CalculateTaskAsync(container.TaskId);
    167             break;
    168           case MessageContainer.MessageType.AbortTask:
    169             AbortTaskAsync(container.TaskId);
    170             break;
    171           case MessageContainer.MessageType.StopTask:
    172             StopTaskAsync(container.TaskId);
    173             break;
    174           case MessageContainer.MessageType.PauseTask:
    175             PauseTaskAsync(container.TaskId);
    176             break;
    177           case MessageContainer.MessageType.StopAll:
    178             DoStopAll();
    179             break;
    180           case MessageContainer.MessageType.PauseAll:
    181             DoPauseAll();
    182             break;
    183           case MessageContainer.MessageType.AbortAll:
    184             DoAbortAll();
    185             break;
    186           case MessageContainer.MessageType.ShutdownSlave:
    187             ShutdownCore();
    188             break;
    189           case MessageContainer.MessageType.Restart:
    190             DoStartSlave();
    191             break;
    192           case MessageContainer.MessageType.Sleep:
    193             Sleep();
    194             break;
    195           case MessageContainer.MessageType.SayHello:
    196             wcfService.Connect(configManager.GetClientInfo());
    197             break;
    198           case MessageContainer.MessageType.NewHBInterval:
    199             int interval = wcfService.GetNewHeartbeatInterval(ConfigManager.Instance.GetClientInfo().Id);
    200             if (interval != -1) {
    201               HeartbeatManager.Interval = TimeSpan.FromSeconds(interval);
    202             }
    203             break;
    204         }
    205       } else {
    206         clientCom.LogMessage("Unknown MessageContainer: " + container);
     155      SlaveClientCom.Instance.LogMessage(string.Format("Message: {0} for task: {1} ", container.Message.ToString(), container.TaskId));
     156
     157      switch (container.Message) {
     158        case MessageContainer.MessageType.CalculateTask:
     159          CalculateTaskAsync(container.TaskId);
     160          break;
     161        case MessageContainer.MessageType.AbortTask:
     162          AbortTaskAsync(container.TaskId);
     163          break;
     164        case MessageContainer.MessageType.StopTask:
     165          StopTaskAsync(container.TaskId);
     166          break;
     167        case MessageContainer.MessageType.PauseTask:
     168          PauseTaskAsync(container.TaskId);
     169          break;
     170        case MessageContainer.MessageType.StopAll:
     171          DoStopAll();
     172          break;
     173        case MessageContainer.MessageType.PauseAll:
     174          DoPauseAll();
     175          break;
     176        case MessageContainer.MessageType.AbortAll:
     177          DoAbortAll();
     178          break;
     179        case MessageContainer.MessageType.ShutdownSlave:
     180          ShutdownCore();
     181          break;
     182        case MessageContainer.MessageType.Restart:
     183          DoStartSlave();
     184          break;
     185        case MessageContainer.MessageType.Sleep:
     186          Sleep();
     187          break;
     188        case MessageContainer.MessageType.SayHello:
     189          wcfService.Connect(configManager.GetClientInfo());
     190          break;
     191        case MessageContainer.MessageType.NewHBInterval:
     192          int interval = wcfService.GetNewHeartbeatInterval(ConfigManager.Instance.GetClientInfo().Id);
     193          if (interval != -1) {
     194            HeartbeatManager.Interval = TimeSpan.FromSeconds(interval);
     195          }
     196          break;
    207197      }
    208198    }
     
    212202      .ContinueWith((t) => {
    213203        SlaveStatusInfo.IncrementExceptionOccured();
    214         clientCom.LogMessage(t.Exception.ToString());
     204        SlaveClientCom.Instance.LogMessage(t.Exception.ToString());
    215205      }, TaskContinuationOptions.OnlyOnFaulted);
    216206    }
     
    220210       .ContinueWith((t) => {
    221211         SlaveStatusInfo.IncrementExceptionOccured();
    222          clientCom.LogMessage(t.Exception.ToString());
     212         SlaveClientCom.Instance.LogMessage(t.Exception.ToString());
    223213       }, TaskContinuationOptions.OnlyOnFaulted);
    224214    }
     
    228218       .ContinueWith((t) => {
    229219         SlaveStatusInfo.IncrementExceptionOccured();
    230          clientCom.LogMessage(t.Exception.ToString());
     220         SlaveClientCom.Instance.LogMessage(t.Exception.ToString());
    231221       }, TaskContinuationOptions.OnlyOnFaulted);
    232222    }
     
    236226       .ContinueWith((t) => {
    237227         SlaveStatusInfo.IncrementExceptionOccured();
    238          clientCom.LogMessage(t.Exception.ToString());
     228         SlaveClientCom.Instance.LogMessage(t.Exception.ToString());
    239229       }, TaskContinuationOptions.OnlyOnFaulted);
    240230    }
     
    350340        if (task == null) throw new TaskNotFoundException(e.Value.TaskId);
    351341        task.ExecutionTime = e.Value.ExecutionTime;
    352         TaskData taskData = e.Value.GetTaskData();
     342        TaskData taskData = e.Value2;
    353343        wcfService.UpdateTaskData(task, taskData, configManager.GetClientInfo().Id, TaskState.Paused);
    354344      }
    355345      catch (TaskNotFoundException ex) {
    356         clientCom.LogMessage(ex.ToString());
     346        SlaveClientCom.Instance.LogMessage(ex.ToString());
    357347      }
    358348      catch (Exception ex) {
    359         clientCom.LogMessage(ex.ToString());
     349        SlaveClientCom.Instance.LogMessage(ex.ToString());
    360350      }
    361351    }
     
    368358        if (task == null) throw new TaskNotFoundException(e.Value.TaskId);
    369359        task.ExecutionTime = e.Value.ExecutionTime;
    370         TaskData taskData = e.Value.GetTaskData();
     360        TaskData taskData = e.Value2;
    371361        wcfService.UpdateTaskData(task, taskData, configManager.GetClientInfo().Id, TaskState.Finished);
    372362      }
    373363      catch (TaskNotFoundException ex) {
    374         clientCom.LogMessage(ex.ToString());
     364        SlaveClientCom.Instance.LogMessage(ex.ToString());
    375365      }
    376366      catch (Exception ex) {
    377         clientCom.LogMessage(ex.ToString());
     367        SlaveClientCom.Instance.LogMessage(ex.ToString());
    378368      }
    379369    }
     
    395385          wcfService.UpdateJobState(task.Id, TaskState.Failed, exception.ToString());
    396386        }
    397         clientCom.LogMessage(exception.Message);
     387        SlaveClientCom.Instance.LogMessage(exception.Message);
    398388      }
    399389      catch (TaskNotFoundException ex) {
    400390        SlaveStatusInfo.IncrementExceptionOccured();
    401         clientCom.LogMessage(ex.ToString());
     391        SlaveClientCom.Instance.LogMessage(ex.ToString());
    402392      }
    403393      catch (Exception ex) {
    404394        SlaveStatusInfo.IncrementExceptionOccured();
    405         clientCom.LogMessage(ex.ToString());
     395        SlaveClientCom.Instance.LogMessage(ex.ToString());
    406396      }
    407397    }
     
    411401      SlaveStatusInfo.IncrementExceptionOccured();
    412402      heartbeatManager.AwakeHeartBeatThread();
    413       clientCom.LogMessage(string.Format("Exception occured for task {0}: {1}", e.Value.TaskId, e.Value2.ToString()));
     403      SlaveClientCom.Instance.LogMessage(string.Format("Exception occured for task {0}: {1}", e.Value.TaskId, e.Value2.ToString()));
    414404      wcfService.UpdateJobState(e.Value.TaskId, TaskState.Waiting, e.Value2.ToString());
    415405    }
     
    422412    #region Log Events
    423413    private void log_MessageAdded(object sender, EventArgs<string> e) {
    424       clientCom.LogMessage(e.Value.Split('\t')[1]);
     414      try {
     415        SlaveClientCom.Instance.LogMessage(e.Value.Split('\t')[1]);
     416      }
     417      catch { }
    425418    }
    426419    #endregion
     
    430423    /// </summary>
    431424    private void DoAbortAll() {
    432       clientCom.LogMessage("Aborting all jobs.");
     425      SlaveClientCom.Instance.LogMessage("Aborting all jobs.");
    433426      foreach (Guid taskId in taskManager.TaskIds) {
    434427        AbortTaskAsync(taskId);
     
    440433    /// </summary>
    441434    private void DoPauseAll() {
    442       clientCom.LogMessage("Pausing all jobs.");
     435      SlaveClientCom.Instance.LogMessage("Pausing all jobs.");
    443436      foreach (Guid taskId in taskManager.TaskIds) {
    444437        PauseTaskAsync(taskId);
     
    450443    /// </summary>
    451444    private void DoStopAll() {
    452       clientCom.LogMessage("Stopping all jobs.");
     445      SlaveClientCom.Instance.LogMessage("Stopping all jobs.");
    453446      foreach (Guid taskId in taskManager.TaskIds) {
    454447        StopTaskAsync(taskId);
     
    470463    /// </summary>
    471464    private void ShutdownCore() {
    472       clientCom.LogMessage("Shutdown signal received");
    473       clientCom.LogMessage("Stopping heartbeat");
     465      SlaveClientCom.Instance.LogMessage("Shutdown signal received");
     466      SlaveClientCom.Instance.LogMessage("Stopping heartbeat");
    474467      heartbeatManager.StopHeartBeat();
    475468      abortRequested = true;
     
    477470      DoAbortAll();
    478471
    479       clientCom.LogMessage("Logging out");
     472      SlaveClientCom.Instance.LogMessage("Logging out");
    480473      WcfService.Instance.Disconnect();
    481       clientCom.Shutdown();
     474      SlaveClientCom.Instance.ClientCom.Shutdown();
    482475      SlaveClientCom.Close();
    483476
     
    493486    /// </summary> 
    494487    private void DoStartSlave() {
    495       clientCom.LogMessage("Restart received");
     488      SlaveClientCom.Instance.LogMessage("Restart received");
    496489      configManager.Asleep = false;
    497490    }
     
    502495    /// </summary>   
    503496    private void Sleep() {
    504       clientCom.LogMessage("Sleep received - not accepting any new jobs");
     497      SlaveClientCom.Instance.LogMessage("Sleep received - not accepting any new jobs");
    505498      configManager.Asleep = true;
    506499      DoPauseAll();
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/DummyListener.cs

    r6983 r7215  
    2626namespace HeuristicLab.Clients.Hive.SlaveCore {
    2727
    28   [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant)]
     28  [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant, UseSynchronizationContext = false)]
    2929  internal class DummyListener : ISlaveCommunicationCallbacks {
    3030
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Executor.cs

    r6983 r7215  
    9191      catch (Exception e) {
    9292        this.CurrentException = e;
     93        taskDataInvalid = true;
    9394        Task_TaskFailed(this, new EventArgs<Exception>(e));
    94       }
    95       finally {
     95      } finally {
    9696        taskStartedSem.Set();
    9797      }
     
    188188      if (taskDataInvalid) return null;
    189189
    190       if (task.ExecutionState == ExecutionState.Started) {
     190      if (task != null && task.ExecutionState == ExecutionState.Started) {
    191191        throw new InvalidStateException("Task is still running");
    192192      } else {
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/HeuristicLab.Clients.Hive.Slave-3.3.csproj

    r7019 r7215  
    8181  <PropertyGroup>
    8282    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
    83   </PropertyGroup>
    84   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLocal|AnyCPU'">
    85     <DebugSymbols>true</DebugSymbols>
    86     <OutputPath>..\..\bin\</OutputPath>
    87     <DefineConstants>DEBUG;TRACE</DefineConstants>
    88     <DebugType>full</DebugType>
    89     <PlatformTarget>AnyCPU</PlatformTarget>
    90     <CodeAnalysisLogFile>C:\dev\HeursticLab.Azure\\bin\HeuristicLab.Clients.Hive.SlaveCore-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    91     <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    92     <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    93     <ErrorReport>prompt</ErrorReport>
    94     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    95     <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
    96     <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    97     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    98     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    99   </PropertyGroup>
    100   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLocal|x86'">
    101     <DebugSymbols>true</DebugSymbols>
    102     <OutputPath>bin\x86\DebugLocal\</OutputPath>
    103     <DefineConstants>DEBUG;TRACE</DefineConstants>
    104     <DebugType>full</DebugType>
    105     <PlatformTarget>x86</PlatformTarget>
    106     <CodeAnalysisLogFile>C:\dev\HeursticLab.Azure\\bin\HeuristicLab.Clients.Hive.SlaveCore-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    107     <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    108     <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    109     <ErrorReport>prompt</ErrorReport>
    110     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    111     <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
    112     <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    113     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    114     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    115   </PropertyGroup>
    116   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLocal|x64'">
    117     <DebugSymbols>true</DebugSymbols>
    118     <OutputPath>bin\x64\DebugLocal\</OutputPath>
    119     <DefineConstants>DEBUG;TRACE</DefineConstants>
    120     <DebugType>full</DebugType>
    121     <PlatformTarget>x64</PlatformTarget>
    122     <CodeAnalysisLogFile>C:\dev\HeursticLab.Azure\\bin\HeuristicLab.Clients.Hive.SlaveCore-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    123     <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    124     <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    125     <ErrorReport>prompt</ErrorReport>
    126     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    127     <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
    128     <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    129     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    130     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    131   </PropertyGroup>
    132   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugServices|AnyCPU'">
    133     <DebugSymbols>true</DebugSymbols>
    134     <OutputPath>..\..\bin\</OutputPath>
    135     <DefineConstants>DEBUG;TRACE</DefineConstants>
    136     <DebugType>full</DebugType>
    137     <PlatformTarget>AnyCPU</PlatformTarget>
    138     <CodeAnalysisLogFile>C:\dev\HeursticLab.Azure\\bin\HeuristicLab.Clients.Hive.SlaveCore-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    139     <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    140     <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    141     <ErrorReport>prompt</ErrorReport>
    142     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    143     <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
    144     <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    145     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    146     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    147   </PropertyGroup>
    148   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugServices|x86'">
    149     <DebugSymbols>true</DebugSymbols>
    150     <OutputPath>bin\x86\DebugServices\</OutputPath>
    151     <DefineConstants>DEBUG;TRACE</DefineConstants>
    152     <DebugType>full</DebugType>
    153     <PlatformTarget>x86</PlatformTarget>
    154     <CodeAnalysisLogFile>C:\dev\HeursticLab.Azure\\bin\HeuristicLab.Clients.Hive.SlaveCore-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    155     <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    156     <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    157     <ErrorReport>prompt</ErrorReport>
    158     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    159     <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
    160     <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    161     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    162     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    163   </PropertyGroup>
    164   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugServices|x64'">
    165     <DebugSymbols>true</DebugSymbols>
    166     <OutputPath>bin\x64\DebugServices\</OutputPath>
    167     <DefineConstants>DEBUG;TRACE</DefineConstants>
    168     <DebugType>full</DebugType>
    169     <PlatformTarget>x64</PlatformTarget>
    170     <CodeAnalysisLogFile>C:\dev\HeursticLab.Azure\\bin\HeuristicLab.Clients.Hive.SlaveCore-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    171     <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    172     <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    173     <ErrorReport>prompt</ErrorReport>
    174     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    175     <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
    176     <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    177     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    178     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    17983  </PropertyGroup>
    18084  <ItemGroup>
     
    289193  </PropertyGroup>
    290194  <PropertyGroup>
    291     <PreBuildEvent>"$(SolutionDir)CopyIfNewer.bat" "$(ProjectDir)app.config.$(ConfigurationName)" "$(ProjectDir)app.config"
    292 
    293 set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     195    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    294196set ProjectDir=$(ProjectDir)
    295197set SolutionDir=$(SolutionDir)
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Manager/ConfigManager.cs

    r6983 r7215  
    125125      }
    126126      catch (Exception ex) {
    127         SlaveClientCom.Instance.ClientCom.LogMessage(string.Format("Exception was thrown while trying to get execution times: {0}", ex.Message));
     127        SlaveClientCom.Instance.LogMessage(string.Format("Exception was thrown while trying to get execution times: {0}", ex.Message));
    128128      }
    129129      return prog;
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Manager/HeartbeatManager.cs

    r6983 r7215  
    8282    private void RunHeartBeatThread() {
    8383      while (!threadStopped) {
    84         SlaveClientCom.Instance.ClientCom.StatusChanged(ConfigManager.Instance.GetStatusForClientConsole());
     84        try {
     85          SlaveClientCom.Instance.StatusChanged(ConfigManager.Instance.GetStatusForClientConsole());
     86        }
     87        catch (Exception ex) {
     88          EventLogManager.LogMessage("Couldn't sent status information to client ui. Exception is: " + Environment.NewLine + ex.ToString());
     89        }
    8590
    8691        try {
     
    104109              };
    105110
    106               SlaveClientCom.Instance.ClientCom.LogMessage("Send HB: " + heartBeatData);
     111              SlaveClientCom.Instance.LogMessage("Send HB: " + heartBeatData);
    107112              List<MessageContainer> msgs = wcfService.SendHeartbeat(heartBeatData);
    108113
    109114              if (msgs == null) {
    110                 SlaveClientCom.Instance.ClientCom.LogMessage("Error getting response from HB");
     115                SlaveClientCom.Instance.LogMessage("Error getting response from HB");
    111116                OnExceptionOccured(new Exception("Error getting response from HB"));
    112117              } else {
    113                 SlaveClientCom.Instance.ClientCom.LogMessage("HB Response received (" + msgs.Count + "): ");
    114                 msgs.ForEach(mc => SlaveClientCom.Instance.ClientCom.LogMessage(mc.Message.ToString()));
     118                SlaveClientCom.Instance.LogMessage("HB Response received (" + msgs.Count + "): ");
     119                msgs.ForEach(mc => SlaveClientCom.Instance.LogMessage(mc.Message.ToString()));
    115120                msgs.ForEach(mc => MessageQueue.GetInstance().AddMessage(mc));
    116121              }
     
    119124        }
    120125        catch (Exception e) {
    121           SlaveClientCom.Instance.ClientCom.LogMessage("Heartbeat thread failed: " + e.ToString());
     126          SlaveClientCom.Instance.LogMessage("Heartbeat thread failed: " + e.ToString());
    122127          OnExceptionOccured(e);
    123128        }
     
    125130      }
    126131      waitHandle.Close();
    127       SlaveClientCom.Instance.ClientCom.LogMessage("Heartbeat thread stopped");
     132      SlaveClientCom.Instance.LogMessage("Heartbeat thread stopped");
    128133    }
    129134
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Properties/Settings.Designer.cs

    r7005 r7215  
    2626        [global::System.Configuration.UserScopedSettingAttribute()]
    2727        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    28         [global::System.Configuration.DefaultSettingValueAttribute("00:00:10")]
     28        [global::System.Configuration.DefaultSettingValueAttribute("00:00:20")]
    2929        public global::System.TimeSpan HeartbeatInterval {
    3030            get {
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Properties/Settings.settings

    r7005 r7215  
    44  <Settings>
    55    <Setting Name="HeartbeatInterval" Type="System.TimeSpan" Scope="User">
    6       <Value Profile="(Default)">00:00:10</Value>
     6      <Value Profile="(Default)">00:00:20</Value>
    77    </Setting>
    88    <Setting Name="LastUsedFileName" Type="System.String" Scope="User">
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/SlaveClientCom.cs

    r6989 r7215  
    2121
    2222using System;
     23using HeuristicLab.Clients.Hive.SlaveCore.Properties;
    2324using HeuristicLab.Clients.Hive.SlaveCore.ServiceContracts;
    24 using HeuristicLab.Clients.Hive.SlaveCore.Properties;
     25
    2526namespace HeuristicLab.Clients.Hive.SlaveCore {
    2627
     
    5758    }
    5859
     60    public void LogMessage(string message) {
     61      try {
     62        ClientCom.LogMessage(message);
     63      }
     64      catch (Exception ex) {
     65        EventLogManager.LogMessage("Exception on LogMessage: " + ex.ToString() + Environment.NewLine + "Orginal message was: " + message);
     66      }
     67    }
     68
     69    public void StatusChanged(StatusCommons status) {
     70      try {
     71        ClientCom.StatusChanged(status);
     72      }
     73      catch (Exception ex) {
     74        EventLogManager.LogMessage("Exception on StatusChanged: " + ex.ToString());
     75      }
     76    }
     77
    5978    private SlaveClientCom() {
    6079      ClientComType type = Settings.Default.ClientComType;
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/SlaveCommunicationService.cs

    r6983 r7215  
    2626
    2727namespace HeuristicLab.Clients.Hive.SlaveCore {
     28  [ServiceBehavior(UseSynchronizationContext = false)]
    2829  public class SlaveCommunicationService : ISlaveCommunication {
    2930    private static List<ISlaveCommunicationCallbacks> subscribers = new List<ISlaveCommunicationCallbacks>();
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/WcfService.cs

    r6983 r7215  
    4242        if (instance == null) {
    4343          instance = new WcfService();
    44           ServiceLocator.Instance.Username = HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings.Default.SlaveUser;
    45           ServiceLocator.Instance.Password = HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings.Default.SlavePwd;
     44          HiveServiceLocator.Instance.Username = HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings.Default.SlaveUser;
     45          HiveServiceLocator.Instance.Password = HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings.Default.SlavePwd;
    4646        }
    4747        return instance;
     
    161161    public void CallHiveService(Action<IHiveService> call) {
    162162      try {
    163         ServiceLocator.Instance.CallHiveService(call);
     163        HiveServiceLocator.Instance.CallHiveService(call);
    164164      }
    165165      catch (Exception ex) {
     
    170170    private T CallHiveService<T>(Func<IHiveService, T> call) {
    171171      try {
    172         return ServiceLocator.Instance.CallHiveService(call);
     172        return HiveServiceLocator.Instance.CallHiveService(call);
    173173      }
    174174      catch (Exception ex) {
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/app.config

    r7019 r7215  
    11<?xml version="1.0"?>
    22<configuration>
    3   <runtime>
    4     <gcServer enabled="true" />
    5   </runtime>
    6 
    73  <configSections>
    84    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
     
    106    </sectionGroup>
    117  </configSections>
     8  <runtime>
     9    <gcServer enabled="true" />
     10  </runtime>
     11
    1212  <startup>
    1313    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    1414  </startup>
     15 
     16  <system.serviceModel>
     17    <behaviors>
     18      <endpointBehaviors>
     19        <behavior name="HiveBehaviorConfiguration">
     20          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
     21        </behavior>
     22      </endpointBehaviors>
     23    </behaviors>
     24    <bindings>
     25      <wsHttpBinding>
     26        <binding name="wsHttpBinding_Hive" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:20:00" sendTimeout="00:20:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
     27          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
     28          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
     29          <security mode="Message">
     30            <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
     31            <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default" />
     32          </security>
     33        </binding>
     34      </wsHttpBinding>
     35    </bindings>
     36    <services>
     37      <service name="HeuristicLab.Clients.Hive.SlaveCore.SlaveCommunicationService">
     38        <endpoint address="net.pipe://localhost/HeuristicLabSlaveCom" binding="netNamedPipeBinding" contract="HeuristicLab.Clients.Hive.SlaveCore.ServiceContracts.ISlaveCommunication"/>
     39      </service>
     40    </services>
     41    <client>
     42      <endpoint name="SlaveCommunicationServiceEndpoint" address="net.pipe://localhost/HeuristicLabSlaveCom" binding="netNamedPipeBinding" contract="HeuristicLab.Clients.Hive.SlaveCore.ServiceContracts.ISlaveCommunication"/>
     43      <endpoint address="http://services.heuristiclab.com/Hive-3.3/HiveService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_Hive" contract="HeuristicLab.Clients.Hive.IHiveService" name="wsHttpBinding_IHiveService" behaviorConfiguration="HiveBehaviorConfiguration">
     44        <identity>
     45          <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ=="/>
     46        </identity>
     47      </endpoint>
     48    </client>
     49  </system.serviceModel>
    1550  <userSettings>
    1651    <HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings>
    1752      <setting name="HeartbeatInterval" serializeAs="String">
    18         <value>00:00:10</value>
     53        <value>00:00:20</value>
    1954      </setting>
    2055      <setting name="LastUsedFileName" serializeAs="String">
     
    85120      </setting>
    86121      <setting name="ClientComType" serializeAs="String">
    87         <value>Pipe</value>
     122        <value>Trace</value>
    88123      </setting>
    89124    </HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings>
    90125  </userSettings>
    91  
    92 
    93   <system.serviceModel>
    94     <bindings>
    95       <wsHttpBinding>
    96         <binding name="wsHttpBinding_Hive" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:20:00" sendTimeout="00:20:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
    97           <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    98           <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
    99           <security mode="Message">
    100             <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
    101             <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default" />
    102           </security>
    103         </binding>
    104       </wsHttpBinding>
    105     </bindings>
    106     <services>
    107       <service name="HeuristicLab.Clients.Hive.SlaveCore.SlaveCommunicationService">
    108         <endpoint address="net.pipe://localhost/HeuristicLabSlaveCom" binding="netNamedPipeBinding" contract="HeuristicLab.Clients.Hive.SlaveCore.ServiceContracts.ISlaveCommunication"/>
    109       </service>
    110     </services>
    111     <client>
    112       <endpoint name="SlaveCommunicationServiceEndpoint" address="net.pipe://localhost/HeuristicLabSlaveCom" binding="netNamedPipeBinding" contract="HeuristicLab.Clients.Hive.SlaveCore.ServiceContracts.ISlaveCommunication"/>
    113       <endpoint address="http://services.heuristiclab.com/Hive-3.3/HiveService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_Hive" contract="HeuristicLab.Clients.Hive.IHiveService" name="wsHttpBinding_IHiveService">
    114         <identity>
    115           <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ=="/>
    116         </identity>
    117       </endpoint>
    118     </client>
    119   </system.serviceModel>
    120126</configuration>
Note: See TracChangeset for help on using the changeset viewer.