Started to add support for deskmetrics

This commit is contained in:
kay.one 2012-01-24 19:09:49 -08:00
commit b225db9aaf
93 changed files with 50336 additions and 5459 deletions

View file

@ -2,6 +2,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using DeskMetrics;
using Ninject;
using NLog;
using NzbDrone.Common;
@ -9,6 +10,7 @@ using NzbDrone.Core.Datastore;
using NzbDrone.Core.Instrumentation;
using NzbDrone.Core.Jobs;
using NzbDrone.Core.Providers;
using NzbDrone.Core.Providers.Core;
using NzbDrone.Core.Providers.ExternalNotification;
using NzbDrone.Core.Providers.Indexer;
using PetaPoco;
@ -27,13 +29,15 @@ namespace NzbDrone.Core
Kernel = new StandardKernel();
InitDatabase();
InitAnalytics();
InitQuality();
InitExternalNotifications();
InitIndexers();
InitJobs();
}
private void InitDatabase()
{
Logger.Info("Initializing Database...");
@ -51,6 +55,13 @@ namespace NzbDrone.Core
LogConfiguration.Reload();
}
private void InitAnalytics()
{
var deskMetricsClient = new DeskMetricsClient(Kernel.Get<ConfigProvider>().UGuid, AnalyticsProvider.DESKMETRICS_ID, new EnviromentProvider().Version);
Kernel.Bind<IDeskMetricsClient>().ToConstant(deskMetricsClient);
Kernel.Get<AnalyticsProvider>().Checkpoint();
}
private void InitQuality()
{
Logger.Info("Initializing Quality...");