Example #1
0
 protected override Task ExecuteAsync(CancellationToken stoppingToken)
 {
     return(Task.Run(async() =>
     {
         await ScheduleInProgressRun(stoppingToken);
         while (!stoppingToken.IsCancellationRequested)
         {
             try
             {
                 await _eventBusService.ReadRegisterNft(stoppingToken);
                 await Run(stoppingToken);
             }
             catch (Exception ex)
             {
                 _logger.LogError(ex, "{ServiceName} failed", GetType().FullName);
             }
         }
     }, stoppingToken));
 }