本文整理汇总了Java中org.springframework.batch.core.BatchStatus.COMPLETED属性的典型用法代码示例。如果您正苦于以下问题:Java BatchStatus.COMPLETED属性的具体用法?Java BatchStatus.COMPLETED怎么用?Java BatchStatus.COMPLETED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.springframework.batch.core.BatchStatus
的用法示例。
在下文中一共展示了BatchStatus.COMPLETED属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: afterJob
@Override
public void afterJob(JobExecution jobExecution) {
if(jobExecution.getStatus() == BatchStatus.COMPLETED) {
logger.info("!!! JOB FINISHED! LAST POSTID IMPORTED: " +
jobExecution.getExecutionContext().get("postId") );
}
}
示例2: afterJob
@Override
public void afterJob(JobExecution jobExecution) {
if(jobExecution.getStatus() == BatchStatus.COMPLETED) {
long statId = (long) jobExecution.getExecutionContext().get("statId");
logger.info("!!! GITHUB JOB FINISHED! CURRENT STATID: " + statId);
ExitStatus es = jobExecution.getExitStatus();
jobExecution.setExitStatus(new ExitStatus(es.getExitCode(), String.valueOf(statId)));
}
}
示例3: afterJob
@Override
public void afterJob(JobExecution jobExecution) {
if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
StatusJobs.getMonitor(JOB_NAME, JOB_GROUP, jobExecution.getExecutionContext())
.done();
}
if (jobExecution.getStatus() == BatchStatus.FAILED) {
StatusJobs.getMonitor(JOB_NAME, JOB_GROUP, jobExecution.getExecutionContext())
.fail("Execution failure");
}
}
示例4: afterJob
@Override
public void afterJob(JobExecution jobExecution) {
if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
log.info("!!! JOB FINISHED! Time to verify the results");
List<Person> results = personDao.findAll();
for (Person person : results) {
log.info("Found <" + person + "> in the database.");
}
}
}
示例5: isJobExecutionStoppable
/**
* Determine whether the provided {@link JobExecution} is stoppable.
*
* @param jobExecution Must not be null and its {@link BatchStatus} must not be null
* either.
* @return Never returns null
*/
public static boolean isJobExecutionStoppable(JobExecution jobExecution) {
Assert.notNull(jobExecution, "The provided jobExecution must not be null.");
final BatchStatus batchStatus = jobExecution.getStatus();
Assert.notNull(batchStatus, "The BatchStatus of the provided jobExecution must not be null.");
return batchStatus.isLessThan(BatchStatus.STOPPING) && batchStatus != BatchStatus.COMPLETED;
}
示例6: afterJob
@Override
public void afterJob(JobExecution jobExecution) {
if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
log.info("+++ job finished!");
jdbcTemplate
.query("SELECT login, passwd, age FROM person", (RowMapper<Person>) (rs, row) -> new Person(rs.getString(1), rs.getString(2), rs.getInt(3)))
.stream().forEach(p -> log.info("Found {} in the ds", p));
}
}
示例7: afterJob
@Override
public void afterJob(JobExecution jobExecution) {
if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
log.debug("Ticket import job completed.");
metrics.stream()
.map(metric -> String.format("%s = %s", metric.getMetricName(), metric.getMetricValue()))
.forEach(log::debug);
}
}
示例8: afterJob
@Override
public void afterJob(JobExecution jobExecution) {
if(jobExecution.getStatus() == BatchStatus.COMPLETED) {
logger.info("Job execution was successful");
}else {
logger.info("Job failed with status {}",jobExecution.getStatus() );
}
}
示例9: consider
public boolean consider(final JobExecution execution) {
if (execution != null) {
if (latestExecution == null) {
latestExecution = execution;
}
if (latestSuccessfulExecution == null && execution.getStatus() == BatchStatus.COMPLETED) {
latestSuccessfulExecution = execution;
}
}
return isComplete();
}
示例10: afterJob
@Override
public void afterJob(JobExecution jobExecution) {
if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
judgmentEnrichmentHashRepository.markAllAsProcessed();
}
}
示例11: afterJob
@Override
public void afterJob(JobExecution jobExecution) {
log.info("작업 결과 상세. 시작=[{}], 완료=[{}], ExitStatus=[{}]",
jobExecution.getStartTime(), jobExecution.getEndTime(), jobExecution.getExitStatus());
if (jobExecution.getStatus() == BatchStatus.COMPLETED) {
log.info("작업이 성공적으로 완료되었습니다.");
} else if (jobExecution.getStatus() == BatchStatus.FAILED) {
log.info("작업이 실패했습니다.");
}
}