mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
use async main in Agent
This commit is contained in:
parent
24b83fd3a7
commit
73e3b47131
1 changed files with 4 additions and 4 deletions
|
|
@ -17,14 +17,14 @@ public static class Program
|
|||
private static SnapshotService snapshotService;
|
||||
private static Logger logger;
|
||||
|
||||
public static void Main()
|
||||
public static async Task Main()
|
||||
{
|
||||
BuildConfigRoot();
|
||||
BuildServiceProvider();
|
||||
snapshotService = serviceProvider.GetService<SnapshotService>();
|
||||
using (logger = new Logger(configRoot[AppInsightsKeyConfig]))
|
||||
{
|
||||
CaptureSnapshots(BatchSize);
|
||||
await CaptureSnapshots(BatchSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -41,10 +41,10 @@ private static void BuildServiceProvider()
|
|||
serviceProvider = serviceCollection.BuildServiceProvider();
|
||||
}
|
||||
|
||||
private static void CaptureSnapshots(int batchSize)
|
||||
private static async Task CaptureSnapshots(int batchSize)
|
||||
{
|
||||
logger.Log("Capturing FilterList snapshots...");
|
||||
TryCaptureAsync(batchSize).Wait();
|
||||
await TryCaptureAsync(batchSize);
|
||||
logger.Log("Snapshots captured.");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue