Last change
on this file since 9032 was
8958,
checked in by fschoepp, 12 years ago
|
#1888:
- Added a administrator web interface for job management
- Fixed Hive Client (PluginValidator) to find the assemblies within the right directories
- Reorganized controller classes (Folders HL, Interfaces, Azure)
- You may now successfully schedule and run jobs with the web ui.
|
File size:
1.3 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using Microsoft.WindowsAzure;
|
---|
5 | using Microsoft.WindowsAzure.Diagnostics;
|
---|
6 | using Microsoft.WindowsAzure.ServiceRuntime;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.Services.Optimization.Web {
|
---|
9 | public static class Constants {
|
---|
10 | public const string DiagnosticsConnectionString = "Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString";
|
---|
11 | }
|
---|
12 |
|
---|
13 | public class WebRole : RoleEntryPoint {
|
---|
14 | public override bool OnStart() {
|
---|
15 | // For information on handling configuration changes
|
---|
16 | // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
|
---|
17 | try {
|
---|
18 | if (!String.IsNullOrEmpty(RoleEnvironment.GetConfigurationSettingValue(Constants.DiagnosticsConnectionString))) {
|
---|
19 | DiagnosticMonitorConfiguration dmc = DiagnosticMonitor.GetDefaultInitialConfiguration();
|
---|
20 | dmc.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);
|
---|
21 | dmc.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose;
|
---|
22 | DiagnosticMonitor.Start(Constants.DiagnosticsConnectionString, dmc);
|
---|
23 | }
|
---|
24 | }
|
---|
25 | catch (RoleEnvironmentException ex) {
|
---|
26 | // diagnostics connection string not in configuration
|
---|
27 | // -> diagnostics disabled
|
---|
28 | // nothing more to do
|
---|
29 | }
|
---|
30 |
|
---|
31 | return base.OnStart();
|
---|
32 | }
|
---|
33 | }
|
---|
34 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.