protected override async Task ExecuteAsync(CancellationToken cancellationToken)
        {
            await _webhookHandler.InvokeAsync(
                WebhookEvents.BackgroundServiceStarted,
                _healthCheckRepository.Get());

            while (!cancellationToken.IsCancellationRequested)
            {
                await _webhookHandler.InvokeAsync(
                    WebhookEvents.BackgroundServiceProcessing,
                    _healthCheckRepository.Get());

                await Task.Delay(TimeSpan.FromSeconds(30), cancellationToken);
            }
        }
Esempio n. 2
0
 public ActionResult Get()
 {
     return(Ok(_healthCheckRepository.Get()));
 }