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
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
chenriksson committed Aug 8, 2018
1 parent d882c84 commit ef2b695
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Stats.RollUpDownloadFacts/RollUpDownloadFactsJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ public class RollUpDownloadFactsJob : JsonConfigurationJob
private const string _startTemplateRecordsDeletion = "Package Dimension ID ";
private const string _endTemplateFactDownloadDeletion = " records from [dbo].[Fact_Download]";
private const int DefaultMinAgeInDays = 43;
private static int _minAgeInDays;

public RollUpDownloadFactsConfiguration Configuration { get; set; }
private RollUpDownloadFactsConfiguration _configuration;
private int _minAgeInDays;

public override void Init(IServiceContainer serviceContainer, IDictionary<string, string> jobArgsDictionary)
{
base.Init(serviceContainer, jobArgsDictionary);

Configuration = _serviceProvider.GetRequiredService<IOptionsSnapshot<RollUpDownloadFactsConfiguration>>().Value;
_configuration = _serviceProvider.GetRequiredService<IOptionsSnapshot<RollUpDownloadFactsConfiguration>>().Value;

_minAgeInDays = Configuration.MinAgeInDays ?? DefaultMinAgeInDays;
_minAgeInDays = _configuration.MinAgeInDays ?? DefaultMinAgeInDays;
Logger.LogInformation("Min age in days: {MinAgeInDays}", _minAgeInDays);
}

Expand Down

0 comments on commit ef2b695

Please sign in to comment.