mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
minor Agent refactor
This commit is contained in:
parent
106f7bec1e
commit
de255bff54
1 changed files with 2 additions and 1 deletions
|
|
@ -14,12 +14,14 @@ public static class Program
|
|||
private const string AppInsightsKeyConfig = "ApplicationInsights:InstrumentationKey";
|
||||
private static IConfigurationRoot configRoot;
|
||||
private static ServiceProvider serviceProvider;
|
||||
private static SnapshotService snapshotService;
|
||||
private static Logger logger;
|
||||
|
||||
public static void Main()
|
||||
{
|
||||
BuildConfigRoot();
|
||||
BuildServiceProvider();
|
||||
snapshotService = serviceProvider.GetService<SnapshotService>();
|
||||
using (BuildLogger())
|
||||
{
|
||||
CaptureSnapshots(BatchSize);
|
||||
|
|
@ -50,7 +52,6 @@ private static void CaptureSnapshots(int batchSize)
|
|||
|
||||
private static async Task TryCaptureAsync(int batchSize)
|
||||
{
|
||||
var snapshotService = serviceProvider.GetService<SnapshotService>();
|
||||
try
|
||||
{
|
||||
await snapshotService.CaptureAsync(batchSize);
|
||||
|
|
|
|||
Loading…
Reference in a new issue