Search in sources :

Example 1 with JobMigrateInfo

use of com.vip.saturn.job.console.domain.JobMigrateInfo in project Saturn by vipshop.

the class JobController method batchTasksMigrateEnabled.

@RequestMapping(value = "batchTasksMigrateEnabled", method = RequestMethod.GET)
public RequestResult batchTasksMigrateEnabled(HttpServletRequest request) {
    RequestResult requestResult = new RequestResult();
    try {
        JobMigrateInfo jobMigrateInfo = jobDimensionService.getAllJobMigrateInfo();
        requestResult.setSuccess(true);
        requestResult.setObj(jobMigrateInfo);
    } catch (Exception e) {
        requestResult.setSuccess(false);
        requestResult.setMessage(e.getMessage());
    }
    return requestResult;
}
Also used : RequestResult(com.vip.saturn.job.console.domain.RequestResult) JobMigrateInfo(com.vip.saturn.job.console.domain.JobMigrateInfo) ParseException(java.text.ParseException) SaturnJobConsoleException(com.vip.saturn.job.console.exception.SaturnJobConsoleException) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 2 with JobMigrateInfo

use of com.vip.saturn.job.console.domain.JobMigrateInfo in project Saturn by vipshop.

the class JobController method tasksMigrateEnabled.

@RequestMapping(value = "tasksMigrateEnabled", method = RequestMethod.GET)
public RequestResult tasksMigrateEnabled(final String jobName, HttpServletRequest request) {
    RequestResult requestResult = new RequestResult();
    try {
        JobMigrateInfo jobMigrateInfo = jobDimensionService.getJobMigrateInfo(jobName);
        requestResult.setSuccess(true);
        requestResult.setObj(jobMigrateInfo);
    } catch (Exception e) {
        requestResult.setSuccess(false);
        requestResult.setMessage(e.getMessage());
    }
    return requestResult;
}
Also used : RequestResult(com.vip.saturn.job.console.domain.RequestResult) JobMigrateInfo(com.vip.saturn.job.console.domain.JobMigrateInfo) ParseException(java.text.ParseException) SaturnJobConsoleException(com.vip.saturn.job.console.exception.SaturnJobConsoleException) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

JobMigrateInfo (com.vip.saturn.job.console.domain.JobMigrateInfo)2 RequestResult (com.vip.saturn.job.console.domain.RequestResult)2 SaturnJobConsoleException (com.vip.saturn.job.console.exception.SaturnJobConsoleException)2 ParseException (java.text.ParseException)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2