Exemplo n.º 1
0
        public IHttpActionResult QueryProcessTaskStatus(JobsInQueue jobsInQueue)
        {
            var details = jobQueueService.QueryJobsStatus(jobsInQueue.CreatedJobIds);

            jobsInQueue.CompleteJobIds   = details.Where(x => x.ProcessStatus == ProcessStatus.Completed).Select(x => x.Id.ToString()).ToList();
            jobsInQueue.ErrorJobIds      = details.Where(x => x.ProcessStatus == ProcessStatus.FailToPublish || x.ResultStatus == ResultStatus.Error).Select(x => x.Id.ToString()).ToList();
            jobsInQueue.ProcessingJobIds = details.Where(x => x.ProcessStatus == ProcessStatus.Processing).Select(x => x.Id.ToString()).ToList();
            jobsInQueue.SuccessJobIds    = details.Where(x => x.ResultStatus == ResultStatus.Success).Select(x => x.Id.ToString()).ToList();

            return(Ok(jobsInQueue));
        }