Пример #1
0
        public async Task <IActionResult> CancelJobQueue(int projectId, int queueId)
        {
            _logger.LogInformation("Cancel job queue {queueId} in project {projectId}", queueId, projectId);

            try
            {
                await _jobQueueService.CancelJobQueue(queueId);

                return(Ok());
            }
            catch (CancelCompletedJobException ex)
            {
                _logger.LogWarning(ex, "Cannot cancel a completed job");
                return(BadRequest(ex.Message));
            }
        }