Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7371


Ignore:
Timestamp:
01/19/12 15:15:15 (13 years ago)
Author:
spimming
Message:

#1680:

  • start diagnostic monitor only when a connection string is specified
  • constants file added
Location:
branches/HeuristicLab.Hive.Azure
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave.Azure/ServiceConfiguration.Cloud.cscfg

    r7005 r7371  
    44    <Instances count="1" />
    55    <ConfigurationSettings>
    6       <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=hivestorage;AccountKey=Idq7D7dTvhpByPproP//rmdEaU5gmRxG62jAnJdghgzKqolnzsWjVTwNbg3p5BXVl86FuAXqvKlUAYFrMuSCMw==" />
    76      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
    87      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" />
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave.Azure/ServiceConfiguration.Local.cscfg

    r7005 r7371  
    44    <Instances count="1" />
    55    <ConfigurationSettings>
    6       <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
    76      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
    87      <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="hive" />
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave.Azure/ServiceDefinition.build.csdef

    r7005 r7371  
    1212  <WorkerRole name="HeuristicLab.Clients.Hive.Slave.AzureClient" vmsize="Small">
    1313    <Imports>
    14       <Import moduleName="Diagnostics" />
    1514      <Import moduleName="RemoteAccess" />
    1615      <Import moduleName="RemoteForwarder" />
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave.Azure/ServiceDefinition.csdef

    r7005 r7371  
    33  <WorkerRole name="HeuristicLab.Clients.Hive.Slave.AzureClient" vmsize="Small">
    44    <Imports>
    5       <Import moduleName="Diagnostics" />
    65      <Import moduleName="RemoteAccess" />
    76      <Import moduleName="RemoteForwarder" />
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave.AzureClient/HeuristicLab.Clients.Hive.Slave.AzureClient.csproj

    r7215 r7371  
    6262  </ItemGroup>
    6363  <ItemGroup>
     64    <Compile Include="Constants.cs" />
    6465    <Compile Include="WorkerRole.cs" />
    6566    <Compile Include="Properties\AssemblyInfo.cs" />
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.Slave.AzureClient/WorkerRole.cs

    r7005 r7371  
    1818      while (true) {
    1919        Thread.Sleep(10000);
    20         //Trace.WriteLine("Working", "Information");
    2120      }
    2221    }
     
    2524      ServicePointManager.DefaultConnectionLimit = 12;
    2625      core = new Core();
    27 
    28       DiagnosticMonitorConfiguration dmc = DiagnosticMonitor.GetDefaultInitialConfiguration();
    29       dmc.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);
    30       dmc.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose;
    31       DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", dmc);
     26      try {
     27        if (!String.IsNullOrEmpty(RoleEnvironment.GetConfigurationSettingValue(Constants.DiagnosticsConnectionString))) {
     28          DiagnosticMonitorConfiguration dmc = DiagnosticMonitor.GetDefaultInitialConfiguration();
     29          dmc.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);
     30          dmc.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose;
     31          DiagnosticMonitor.Start(Constants.DiagnosticsConnectionString, dmc);
     32        }
     33      }
     34      catch (RoleEnvironmentException ex) {
     35        //diagnostics connectio string not in configuration
     36        //-> diagnostics disabled
     37        //nothing more to do
     38      }
    3239
    3340      return base.OnStart();
Note: See TracChangeset for help on using the changeset viewer.