Integer depth=(Integer) jobContext.getData("depth");
if(depth==null){
depth=0;
}
if(depth<2){//job 的递归深度控制,防止无限递归
JobProcesser jobProcesser=(JobProcesser) p;
GroupManager groupManager=(GroupManager) applicationContext.getBean("groupManager");
JobBean jb=groupManager.getUpstreamJobBean(jobProcesser.getJobId());
if(jb!=null){
for(String key:jobProcesser.getKvConfig().keySet()){
if(jobProcesser.getKvConfig().get(key)!=null){
jb.getJobDescriptor().getProperties().put(key, jobProcesser.getKvConfig().get(key));
}
}
File direcotry=new File(workDir+File.separator+"job-processer-"+jobProcesser.getJobId());
if(!direcotry.exists()){
direcotry.mkdirs();
}
JobContext sub=new JobContext(jobContext.getRunType());
sub.putData("depth", ++depth);