protected override async Task DoWork(CancellationToken cancellationToken) { try { var jobs = await _jobSlowFileService.GetJobsThatAreSlowFile(cancellationToken); await _jobSlowFileHub.SendMessage(jobs); } catch (Exception ex) { _logger.LogError($"Failed to {nameof(DoWork)} in {nameof(JobSlowFileTimedHostedService)}", ex); } }
public async Task <IActionResult> Index(CancellationToken cancellationToken) { var model = _jsonSerializationService.Deserialize <JobProcessingModel <JobSlowFileLookupModel> >(await _jobSlowFileService.GetJobsThatAreSlowFile(cancellationToken)); return(View("Index", model)); }