protected override async Task DoWork(CancellationToken cancellationToken)
        {
            try
            {
                var jobs = await _jobConcernService.GetJobsThatAreConcern(cancellationToken);

                await _jobConcernHub.SendMessage(jobs);
            }
            catch (Exception ex)
            {
                _logger.LogError($"Failed to {nameof(DoWork)} in {nameof(JobConcernTimedHostedService)}", ex);
            }
        }
예제 #2
0
        public async Task <IActionResult> Index(CancellationToken cancellationToken)
        {
            var model = _jsonSerializationService.Deserialize <JobProcessingModel <JobConcernLookupModel> >(await _jobConcernService.GetJobsThatAreConcern(cancellationToken));

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