Skip to content

Commit

Permalink
add improved error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
aspriddell committed Dec 1, 2024
1 parent 7259544 commit b014aab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DragonFruit.OnionFruit.Web.Worker/Worker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private List<GeneratorDescriptor> GetDescriptors(IConfiguration config)
Task IHostedService.StartAsync(CancellationToken cancellationToken)
{
_workerTimer?.Dispose();
_workerTimer = new Timer(s => _ = PerformUpdate(), null, TimeSpan.Zero, TimeSpan.FromHours(12));
_workerTimer = new Timer(s => _ = PerformUpdate().ContinueWith(e => _logger.LogError(e.Exception, "Refresh failed: {err}", e.Exception?.Message), TaskContinuationOptions.OnlyOnFaulted), null, TimeSpan.Zero, TimeSpan.FromHours(12));

return Task.CompletedTask;
}
Expand Down

0 comments on commit b014aab

Please sign in to comment.