private void saveTransitions(JobInstance jobInstance) { for (JobStateTransition transition : jobInstance.getTransitions()) { if (!transition.hasId()) { saveTransition(jobInstance, transition); } } if (jobInstance.getIdentifier() != null) { String pipelineName = jobInstance.getIdentifier().getPipelineName(); String stageName = jobInstance.getIdentifier().getStageName(); cache.flushEntry(jobInstance.getBuildDurationKey(pipelineName, stageName)); } }
private void saveTransition(JobInstance jobInstance, JobStateTransition transition) { transition.setJobId(jobInstance.getId()); transition.setStageId(jobInstance.getStageId()); getSqlMapClientTemplate().insert("insertTransition", transition); }