Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Index(CancellationToken cancellationToken)
        {
            var model = _jsonSerializationService.Deserialize <JobProcessingModel <JobSlowFileLookupModel> >(await _jobSlowFileService.GetJobsThatAreSlowFile(cancellationToken));

            return(View("Index", model));
        }