- Timestamp:
- 12/20/11 13:54:57 (13 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure
- Files:
-
- 2 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure
- Property svn:ignore
-
old new 4 4 *.suo 5 5 *.vsp 6 Doxygen 6 7 Google.ProtocolBuffers-0.9.1.dll 7 8 HeuristicLab 3.3.5.1.ReSharper.user 8 9 HeuristicLab 3.3.6.0.ReSharper.user 9 10 HeuristicLab.4.5.resharper.user 11 HeuristicLab.ExtLibs.6.0.ReSharper.user 10 12 HeuristicLab.resharper.user 11 13 ProtoGen.exe … … 16 18 bin 17 19 protoc.exe 18 HeuristicLab.ExtLibs.6.0.ReSharper.user19 Doxygen
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Core.cs
r6989 r7215 47 47 private Semaphore waitShutdownSem = new Semaphore(0, 1); 48 48 private bool abortRequested; 49 private ISlaveCommunication clientCom;50 49 private ServiceHost slaveComm; 51 50 private WcfService wcfService; … … 86 85 slaveComm.Open(); 87 86 } 88 clientCom = SlaveClientCom.Instance.ClientCom; 89 87 90 88 // delete all left over task directories 91 89 pluginManager.CleanPluginTemp(); 92 clientCom.LogMessage("Hive Slave started");90 SlaveClientCom.Instance.LogMessage("Hive Slave started"); 93 91 94 92 wcfService = WcfService.Instance; … … 102 100 EventLogManager.LogException(ex); 103 101 } 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, 105 103 //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)); 107 105 } 108 106 ShutdownCore(); 109 } 110 finally { 107 } finally { 111 108 DeregisterServiceEvents(); 112 109 waitShutdownSem.Release(); … … 128 125 DetermineAction(container); 129 126 if (!abortRequested) { 130 clientCom.StatusChanged(configManager.GetStatusForClientConsole());127 SlaveClientCom.Instance.StatusChanged(configManager.GetStatusForClientConsole()); 131 128 } 132 129 } … … 144 141 145 142 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)); 147 144 } 148 145 149 146 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"); 151 148 } 152 149 … … 156 153 /// <param name="container">The container, containing the message</param> 157 154 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; 207 197 } 208 198 } … … 212 202 .ContinueWith((t) => { 213 203 SlaveStatusInfo.IncrementExceptionOccured(); 214 clientCom.LogMessage(t.Exception.ToString());204 SlaveClientCom.Instance.LogMessage(t.Exception.ToString()); 215 205 }, TaskContinuationOptions.OnlyOnFaulted); 216 206 } … … 220 210 .ContinueWith((t) => { 221 211 SlaveStatusInfo.IncrementExceptionOccured(); 222 clientCom.LogMessage(t.Exception.ToString());212 SlaveClientCom.Instance.LogMessage(t.Exception.ToString()); 223 213 }, TaskContinuationOptions.OnlyOnFaulted); 224 214 } … … 228 218 .ContinueWith((t) => { 229 219 SlaveStatusInfo.IncrementExceptionOccured(); 230 clientCom.LogMessage(t.Exception.ToString());220 SlaveClientCom.Instance.LogMessage(t.Exception.ToString()); 231 221 }, TaskContinuationOptions.OnlyOnFaulted); 232 222 } … … 236 226 .ContinueWith((t) => { 237 227 SlaveStatusInfo.IncrementExceptionOccured(); 238 clientCom.LogMessage(t.Exception.ToString());228 SlaveClientCom.Instance.LogMessage(t.Exception.ToString()); 239 229 }, TaskContinuationOptions.OnlyOnFaulted); 240 230 } … … 350 340 if (task == null) throw new TaskNotFoundException(e.Value.TaskId); 351 341 task.ExecutionTime = e.Value.ExecutionTime; 352 TaskData taskData = e.Value .GetTaskData();342 TaskData taskData = e.Value2; 353 343 wcfService.UpdateTaskData(task, taskData, configManager.GetClientInfo().Id, TaskState.Paused); 354 344 } 355 345 catch (TaskNotFoundException ex) { 356 clientCom.LogMessage(ex.ToString());346 SlaveClientCom.Instance.LogMessage(ex.ToString()); 357 347 } 358 348 catch (Exception ex) { 359 clientCom.LogMessage(ex.ToString());349 SlaveClientCom.Instance.LogMessage(ex.ToString()); 360 350 } 361 351 } … … 368 358 if (task == null) throw new TaskNotFoundException(e.Value.TaskId); 369 359 task.ExecutionTime = e.Value.ExecutionTime; 370 TaskData taskData = e.Value .GetTaskData();360 TaskData taskData = e.Value2; 371 361 wcfService.UpdateTaskData(task, taskData, configManager.GetClientInfo().Id, TaskState.Finished); 372 362 } 373 363 catch (TaskNotFoundException ex) { 374 clientCom.LogMessage(ex.ToString());364 SlaveClientCom.Instance.LogMessage(ex.ToString()); 375 365 } 376 366 catch (Exception ex) { 377 clientCom.LogMessage(ex.ToString());367 SlaveClientCom.Instance.LogMessage(ex.ToString()); 378 368 } 379 369 } … … 395 385 wcfService.UpdateJobState(task.Id, TaskState.Failed, exception.ToString()); 396 386 } 397 clientCom.LogMessage(exception.Message);387 SlaveClientCom.Instance.LogMessage(exception.Message); 398 388 } 399 389 catch (TaskNotFoundException ex) { 400 390 SlaveStatusInfo.IncrementExceptionOccured(); 401 clientCom.LogMessage(ex.ToString());391 SlaveClientCom.Instance.LogMessage(ex.ToString()); 402 392 } 403 393 catch (Exception ex) { 404 394 SlaveStatusInfo.IncrementExceptionOccured(); 405 clientCom.LogMessage(ex.ToString());395 SlaveClientCom.Instance.LogMessage(ex.ToString()); 406 396 } 407 397 } … … 411 401 SlaveStatusInfo.IncrementExceptionOccured(); 412 402 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())); 414 404 wcfService.UpdateJobState(e.Value.TaskId, TaskState.Waiting, e.Value2.ToString()); 415 405 } … … 422 412 #region Log Events 423 413 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 { } 425 418 } 426 419 #endregion … … 430 423 /// </summary> 431 424 private void DoAbortAll() { 432 clientCom.LogMessage("Aborting all jobs.");425 SlaveClientCom.Instance.LogMessage("Aborting all jobs."); 433 426 foreach (Guid taskId in taskManager.TaskIds) { 434 427 AbortTaskAsync(taskId); … … 440 433 /// </summary> 441 434 private void DoPauseAll() { 442 clientCom.LogMessage("Pausing all jobs.");435 SlaveClientCom.Instance.LogMessage("Pausing all jobs."); 443 436 foreach (Guid taskId in taskManager.TaskIds) { 444 437 PauseTaskAsync(taskId); … … 450 443 /// </summary> 451 444 private void DoStopAll() { 452 clientCom.LogMessage("Stopping all jobs.");445 SlaveClientCom.Instance.LogMessage("Stopping all jobs."); 453 446 foreach (Guid taskId in taskManager.TaskIds) { 454 447 StopTaskAsync(taskId); … … 470 463 /// </summary> 471 464 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"); 474 467 heartbeatManager.StopHeartBeat(); 475 468 abortRequested = true; … … 477 470 DoAbortAll(); 478 471 479 clientCom.LogMessage("Logging out");472 SlaveClientCom.Instance.LogMessage("Logging out"); 480 473 WcfService.Instance.Disconnect(); 481 clientCom.Shutdown();474 SlaveClientCom.Instance.ClientCom.Shutdown(); 482 475 SlaveClientCom.Close(); 483 476 … … 493 486 /// </summary> 494 487 private void DoStartSlave() { 495 clientCom.LogMessage("Restart received");488 SlaveClientCom.Instance.LogMessage("Restart received"); 496 489 configManager.Asleep = false; 497 490 } … … 502 495 /// </summary> 503 496 private void Sleep() { 504 clientCom.LogMessage("Sleep received - not accepting any new jobs");497 SlaveClientCom.Instance.LogMessage("Sleep received - not accepting any new jobs"); 505 498 configManager.Asleep = true; 506 499 DoPauseAll(); -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/DummyListener.cs
r6983 r7215 26 26 namespace HeuristicLab.Clients.Hive.SlaveCore { 27 27 28 [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant )]28 [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant, UseSynchronizationContext = false)] 29 29 internal class DummyListener : ISlaveCommunicationCallbacks { 30 30 -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Executor.cs
r6983 r7215 91 91 catch (Exception e) { 92 92 this.CurrentException = e; 93 taskDataInvalid = true; 93 94 Task_TaskFailed(this, new EventArgs<Exception>(e)); 94 } 95 finally { 95 } finally { 96 96 taskStartedSem.Set(); 97 97 } … … 188 188 if (taskDataInvalid) return null; 189 189 190 if (task .ExecutionState == ExecutionState.Started) {190 if (task != null && task.ExecutionState == ExecutionState.Started) { 191 191 throw new InvalidStateException("Task is still running"); 192 192 } else { -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/HeuristicLab.Clients.Hive.Slave-3.3.csproj
r7019 r7215 81 81 <PropertyGroup> 82 82 <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>179 83 </PropertyGroup> 180 84 <ItemGroup> … … 289 193 </PropertyGroup> 290 194 <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) 294 196 set ProjectDir=$(ProjectDir) 295 197 set SolutionDir=$(SolutionDir) -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Manager/ConfigManager.cs
r6983 r7215 125 125 } 126 126 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)); 128 128 } 129 129 return prog; -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Manager/HeartbeatManager.cs
r6983 r7215 82 82 private void RunHeartBeatThread() { 83 83 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 } 85 90 86 91 try { … … 104 109 }; 105 110 106 SlaveClientCom.Instance. ClientCom.LogMessage("Send HB: " + heartBeatData);111 SlaveClientCom.Instance.LogMessage("Send HB: " + heartBeatData); 107 112 List<MessageContainer> msgs = wcfService.SendHeartbeat(heartBeatData); 108 113 109 114 if (msgs == null) { 110 SlaveClientCom.Instance. ClientCom.LogMessage("Error getting response from HB");115 SlaveClientCom.Instance.LogMessage("Error getting response from HB"); 111 116 OnExceptionOccured(new Exception("Error getting response from HB")); 112 117 } 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())); 115 120 msgs.ForEach(mc => MessageQueue.GetInstance().AddMessage(mc)); 116 121 } … … 119 124 } 120 125 catch (Exception e) { 121 SlaveClientCom.Instance. ClientCom.LogMessage("Heartbeat thread failed: " + e.ToString());126 SlaveClientCom.Instance.LogMessage("Heartbeat thread failed: " + e.ToString()); 122 127 OnExceptionOccured(e); 123 128 } … … 125 130 } 126 131 waitHandle.Close(); 127 SlaveClientCom.Instance. ClientCom.LogMessage("Heartbeat thread stopped");132 SlaveClientCom.Instance.LogMessage("Heartbeat thread stopped"); 128 133 } 129 134 -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Properties/Settings.Designer.cs
r7005 r7215 26 26 [global::System.Configuration.UserScopedSettingAttribute()] 27 27 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 [global::System.Configuration.DefaultSettingValueAttribute("00:00: 10")]28 [global::System.Configuration.DefaultSettingValueAttribute("00:00:20")] 29 29 public global::System.TimeSpan HeartbeatInterval { 30 30 get { -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/Properties/Settings.settings
r7005 r7215 4 4 <Settings> 5 5 <Setting Name="HeartbeatInterval" Type="System.TimeSpan" Scope="User"> 6 <Value Profile="(Default)">00:00: 10</Value>6 <Value Profile="(Default)">00:00:20</Value> 7 7 </Setting> 8 8 <Setting Name="LastUsedFileName" Type="System.String" Scope="User"> -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/SlaveClientCom.cs
r6989 r7215 21 21 22 22 using System; 23 using HeuristicLab.Clients.Hive.SlaveCore.Properties; 23 24 using HeuristicLab.Clients.Hive.SlaveCore.ServiceContracts; 24 using HeuristicLab.Clients.Hive.SlaveCore.Properties; 25 25 26 namespace HeuristicLab.Clients.Hive.SlaveCore { 26 27 … … 57 58 } 58 59 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 59 78 private SlaveClientCom() { 60 79 ClientComType type = Settings.Default.ClientComType; -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/SlaveCommunicationService.cs
r6983 r7215 26 26 27 27 namespace HeuristicLab.Clients.Hive.SlaveCore { 28 [ServiceBehavior(UseSynchronizationContext = false)] 28 29 public class SlaveCommunicationService : ISlaveCommunication { 29 30 private static List<ISlaveCommunicationCallbacks> subscribers = new List<ISlaveCommunicationCallbacks>(); -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/WcfService.cs
r6983 r7215 42 42 if (instance == null) { 43 43 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; 46 46 } 47 47 return instance; … … 161 161 public void CallHiveService(Action<IHiveService> call) { 162 162 try { 163 ServiceLocator.Instance.CallHiveService(call);163 HiveServiceLocator.Instance.CallHiveService(call); 164 164 } 165 165 catch (Exception ex) { … … 170 170 private T CallHiveService<T>(Func<IHiveService, T> call) { 171 171 try { 172 return ServiceLocator.Instance.CallHiveService(call);172 return HiveServiceLocator.Instance.CallHiveService(call); 173 173 } 174 174 catch (Exception ex) { -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave/3.3/app.config
r7019 r7215 1 1 <?xml version="1.0"?> 2 2 <configuration> 3 <runtime>4 <gcServer enabled="true" />5 </runtime>6 7 3 <configSections> 8 4 <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > … … 10 6 </sectionGroup> 11 7 </configSections> 8 <runtime> 9 <gcServer enabled="true" /> 10 </runtime> 11 12 12 <startup> 13 13 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> 14 14 </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> 15 50 <userSettings> 16 51 <HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings> 17 52 <setting name="HeartbeatInterval" serializeAs="String"> 18 <value>00:00: 10</value>53 <value>00:00:20</value> 19 54 </setting> 20 55 <setting name="LastUsedFileName" serializeAs="String"> … … 85 120 </setting> 86 121 <setting name="ClientComType" serializeAs="String"> 87 <value> Pipe</value>122 <value>Trace</value> 88 123 </setting> 89 124 </HeuristicLab.Clients.Hive.SlaveCore.Properties.Settings> 90 125 </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>120 126 </configuration>
Note: See TracChangeset
for help on using the changeset viewer.