Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Commit

Permalink
Merge pull request #557 from NuGet/ryuyu-update-packagelag
Browse files Browse the repository at this point in the history
Fixing some DI References that were causing a few failures.
  • Loading branch information
ryuyu authored Sep 21, 2018
2 parents 9cb3e60 + b652ce8 commit 62d67a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PackageLagMonitor/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override void Init(IServiceContainer serviceContainer, IDictionary<string
_serviceProvider = GetServiceProvider(GetConfigurationRoot(configurationFilename));

_configuration = _serviceProvider.GetService<PackageLagMonitorConfiguration>();
_azureManagementApiWrapper = _serviceProvider.GetService<AzureManagementAPIWrapper>();
_azureManagementApiWrapper = _serviceProvider.GetService<IAzureManagementAPIWrapper>();
_catalogClient = _serviceProvider.GetService<CatalogClient>();
_httpClient = _serviceProvider.GetService<HttpClient>();
_searchServiceClient = _serviceProvider.GetService<ISearchServiceClient>();
Expand Down Expand Up @@ -97,6 +97,7 @@ private void ConfigureLibraries(IServiceCollection services)
private void ConfigureJobServices(IServiceCollection services, IConfigurationRoot configurationRoot)
{
services.Configure<PackageLagMonitorConfiguration>(configurationRoot.GetSection(MonitorConfigurationSectionName));
services.Configure<SearchServiceConfiguration>(configurationRoot.GetSection(MonitorConfigurationSectionName));
services.Configure<AzureManagementAPIWrapperConfiguration>(configurationRoot.GetSection(AzureManagementSectionName));

services.AddSingleton(p =>
Expand All @@ -122,7 +123,7 @@ private void ConfigureJobServices(IServiceCollection services, IConfigurationRoo
services.AddTransient<IAzureManagementAPIWrapperConfiguration>(p => p.GetService<IOptionsSnapshot<AzureManagementAPIWrapperConfiguration>>().Value);
services.AddTransient<PackageLagMonitorConfiguration>(p => p.GetService<IOptionsSnapshot<PackageLagMonitorConfiguration>>().Value);
services.AddSingleton<CatalogClient>();
services.AddSingleton<AzureManagementAPIWrapper>();
services.AddSingleton<IAzureManagementAPIWrapper, AzureManagementAPIWrapper>();
services.AddTransient<ISearchServiceClient, SearchServiceClient>();
}

Expand Down

0 comments on commit 62d67a3

Please sign in to comment.