diff options
Diffstat (limited to 'VegaData')
| -rw-r--r-- | VegaData/Program.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/VegaData/Program.cs b/VegaData/Program.cs index 8c23fc3..aef11e6 100644 --- a/VegaData/Program.cs +++ b/VegaData/Program.cs @@ -51,8 +51,12 @@ class DataWorker(IServiceScopeFactory serviceScopeFactory) : BackgroundService protected override async Task ExecuteAsync(CancellationToken stoppingToken) { const int hour = 3600 * 60; while (!stoppingToken.IsCancellationRequested) { - await Work(stoppingToken); - await Task.Delay(hour, stoppingToken); + try { + await Work(stoppingToken); + await Task.Delay(hour, stoppingToken); + } catch (Exception e) { + Console.WriteLine(e); + } } } |
