mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-25 01:06:30 +00:00
deskmetrics doesn't report during dev.
This commit is contained in:
parent
90e5e8eef3
commit
e5fa098d66
3 changed files with 13 additions and 5 deletions
|
@ -64,13 +64,17 @@ namespace NzbDrone.Core
|
|||
ReportingService.RestProvider = Kernel.Get<RestProvider>();
|
||||
|
||||
var appId = AnalyticsProvider.DESKMETRICS_TEST_ID;
|
||||
|
||||
|
||||
if (EnviromentProvider.IsProduction)
|
||||
appId = AnalyticsProvider.DESKMETRICS_PRODUCTION_ID;
|
||||
|
||||
var deskMetricsClient = new DeskMetricsClient(Kernel.Get<ConfigProvider>().UGuid.ToString(), appId, _enviromentProvider.Version);
|
||||
Kernel.Bind<IDeskMetricsClient>().ToConstant(deskMetricsClient);
|
||||
Kernel.Get<AnalyticsProvider>().Checkpoint();
|
||||
|
||||
if (EnviromentProvider.IsProduction)
|
||||
{
|
||||
Kernel.Get<AnalyticsProvider>().Checkpoint();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitQuality()
|
||||
|
@ -119,7 +123,7 @@ namespace NzbDrone.Core
|
|||
Kernel.Bind<IJob>().To<TrimLogsJob>().InSingletonScope();
|
||||
Kernel.Bind<IJob>().To<RecentBacklogSearchJob>().InSingletonScope();
|
||||
Kernel.Bind<IJob>().To<CheckpointJob>().InSingletonScope();
|
||||
|
||||
|
||||
Kernel.Get<JobProvider>().Initialize();
|
||||
Kernel.Get<WebTimer>().StartTimer(30);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Ninject;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.Model.Notification;
|
||||
using NzbDrone.Core.Providers;
|
||||
|
||||
|
@ -33,7 +34,10 @@ namespace NzbDrone.Core.Jobs
|
|||
|
||||
public void Start(ProgressNotification notification, int targetId, int secondaryTargetId)
|
||||
{
|
||||
_analyticsProvider.Checkpoint();
|
||||
if(EnviromentProvider.IsProduction)
|
||||
{
|
||||
_analyticsProvider.Checkpoint();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -34,7 +34,7 @@ namespace NzbDrone.Core.Providers
|
|||
try
|
||||
{
|
||||
//Don't report anything unless working from master branch.
|
||||
if (!IsOnMasterBranch() || !EnviromentProvider.IsProduction)
|
||||
if (!IsOnMasterBranch())
|
||||
return;
|
||||
|
||||
if (EnviromentProvider.IsNewInstall)
|
||||
|
|
Loading…
Reference in a new issue