Ejemplo n.º 1
0
 protected override async Task ExecuteAsync(CancellationToken cancellationToken)
 {
     while (!cancellationToken.IsCancellationRequested)
     {
         try
         {
             await _reportProvider.CallReportProcessor(cancellationToken);
         }
         catch (Exception ex)
         {
             _logger.LogError(ex.GetLogText("DataRefreshService_ExecuteAsync"));
         }
         await Task.Delay(TimeSpan.FromMinutes(int.Parse(_configuration["ReportProcess:PeriodMinuteSpan"])), cancellationToken);
     }
 }
Ejemplo n.º 2
0
        public async Task  TriggerReportService()
        {
            try
            {
                ReportProvider rp = new ReportProvider(_reportProcessorRunService,
                                                       _reportLogger,
                                                       _subscriptionService,
                                                       _reportProcessor,
                                                       true);

                await rp.CallReportProcessor(new System.Threading.CancellationToken());
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.GetLogText("reportapi_start"));
            }
        }