Exemple #1
0
        public async Task <IActionResult> GetJobQueueStatus(int projectId, int queueId, string filter = JobTaskStatusFilterType.All)
        {
            _logger.LogInformation("Getting status for job queue {queueId} in project {projectId}. Filter: {filter}", queueId, projectId, filter);

            try
            {
                var jobTaskStatus = await _jobQueueService.GetJobTaskStatus(queueId, filter);

                var result = _mapper.Map <List <JobTaskStatusDto> >(jobTaskStatus);

                return(Ok(result));
            }
            catch (FilterTypeNotFoundException ex)
            {
                _logger.LogWarning(ex, "Filter type not found");
                return(BadRequest(ex.Message));
            }
        }