@Override
 public void onLeft(LeftItem li) {
   DockerJobTemplateProperty jobTemplate = getJobTemplate(li);
   if (jobTemplate != null) {
     Cloud cloud = DockerCloud.getCloudByName(jobTemplate.getCloudname());
     if (cloud instanceof DockerCloud) {
       ((DockerCloud) cloud).removeJobTemplate(li.getId());
     }
   }
 }
 @Override
 public void onEnterWaiting(WaitingItem wi) {
   DockerJobTemplateProperty jobTemplate = getJobTemplate(wi);
   if (jobTemplate != null) {
     Cloud cloud = DockerCloud.getCloudByName(jobTemplate.getCloudname());
     if (cloud instanceof DockerCloud) {
       ((DockerCloud) cloud).addJobTemplate(wi.getId(), jobTemplate.getTemplate());
     }
   }
 }