public IActionResult CancelJob(CancelJobModel model)
        {
            try
            {
                _logger.LogDebug($"Endpoint: \"JobManagement\" Method: \"CancelJob\" Parameters: \"{model}\"");
                ValidationResult validationResult = new JobManagementValidator(model).Validate();
                if (!validationResult.IsValid)
                {
                    ExceptionHandler.ThrowProperExternalException(new InputValidationException(validationResult.Message));
                }

                return(Ok(_service.CancelJob(model.SubmittedJobInfoId, model.SessionCode)));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
예제 #2
0
 public async Task <IActionResult> CancelJob(string jobId)
 {
     return(await _jobManagementService.CancelJob(jobId, ControllerContext.HttpContext.Request));
 }
예제 #3
0
 public async Task <IActionResult> CancelJob(string jobId) => await _jobManagementService.CancelJob(jobId);