예제 #1
0
 @Override
 protected JobExecution startJob(RequestContext requestContext) throws Exception {
   if (isAllowedToStart(requestContext)) {
     HealthCheckRequestParameter requestParameter =
         (HealthCheckRequestParameter) requestContext.getRequestParameter();
     JobParameters jobParameters = getJobParameters(requestContext, requestParameter);
     return jobRunner.start(JobConfiguration.JOB_NAME, jobParameters);
   } else {
     throw new IllegalStateException(
         "job not allowed to start - running job executions detected for job name: '"
             + getUsecase().getName()
             + "'");
   }
 }