Merge pull request #2211 from majinding/master
fix https://github.com/xuxueli/xxl-job/issues/22102.3.0
commit
c7b3a70a4b
@ -1,29 +1,38 @@
|
|||||||
package com.xxl.job.core.handler.impl;
|
package com.xxl.job.core.handler.impl;
|
||||||
|
|
||||||
import com.xxl.job.core.context.XxlJobHelper;
|
import com.xxl.job.core.context.XxlJobHelper;
|
||||||
import com.xxl.job.core.handler.IJobHandler;
|
import com.xxl.job.core.handler.IJobHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* glue job handler
|
* glue job handler
|
||||||
*
|
*
|
||||||
* @author xuxueli 2016-5-19 21:05:45
|
* @author xuxueli 2016-5-19 21:05:45
|
||||||
*/
|
*/
|
||||||
public class GlueJobHandler extends IJobHandler {
|
public class GlueJobHandler extends IJobHandler {
|
||||||
|
|
||||||
private long glueUpdatetime;
|
private long glueUpdatetime;
|
||||||
private IJobHandler jobHandler;
|
private IJobHandler jobHandler;
|
||||||
public GlueJobHandler(IJobHandler jobHandler, long glueUpdatetime) {
|
public GlueJobHandler(IJobHandler jobHandler, long glueUpdatetime) {
|
||||||
this.jobHandler = jobHandler;
|
this.jobHandler = jobHandler;
|
||||||
this.glueUpdatetime = glueUpdatetime;
|
this.glueUpdatetime = glueUpdatetime;
|
||||||
}
|
}
|
||||||
public long getGlueUpdatetime() {
|
public long getGlueUpdatetime() {
|
||||||
return glueUpdatetime;
|
return glueUpdatetime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() throws Exception {
|
public void execute() throws Exception {
|
||||||
XxlJobHelper.log("----------- glue.version:"+ glueUpdatetime +" -----------");
|
XxlJobHelper.log("----------- glue.version:"+ glueUpdatetime +" -----------");
|
||||||
jobHandler.execute();
|
jobHandler.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
@Override
|
||||||
|
public void init() throws Exception {
|
||||||
|
this.jobHandler.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() throws Exception {
|
||||||
|
this.jobHandler.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in new issue