-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2211 from majinding/master
fix #2210
- Loading branch information
Showing
1 changed file
with
38 additions
and
29 deletions.
There are no files selected for viewing
67 changes: 38 additions & 29 deletions
67
xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/GlueJobHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
package com.xxl.job.core.handler.impl; | ||
|
||
import com.xxl.job.core.context.XxlJobHelper; | ||
import com.xxl.job.core.handler.IJobHandler; | ||
|
||
/** | ||
* glue job handler | ||
* | ||
* @author xuxueli 2016-5-19 21:05:45 | ||
*/ | ||
public class GlueJobHandler extends IJobHandler { | ||
|
||
private long glueUpdatetime; | ||
private IJobHandler jobHandler; | ||
public GlueJobHandler(IJobHandler jobHandler, long glueUpdatetime) { | ||
this.jobHandler = jobHandler; | ||
this.glueUpdatetime = glueUpdatetime; | ||
} | ||
public long getGlueUpdatetime() { | ||
return glueUpdatetime; | ||
} | ||
|
||
@Override | ||
public void execute() throws Exception { | ||
XxlJobHelper.log("----------- glue.version:"+ glueUpdatetime +" -----------"); | ||
jobHandler.execute(); | ||
} | ||
|
||
} | ||
package com.xxl.job.core.handler.impl; | ||
|
||
import com.xxl.job.core.context.XxlJobHelper; | ||
import com.xxl.job.core.handler.IJobHandler; | ||
|
||
/** | ||
* glue job handler | ||
* | ||
* @author xuxueli 2016-5-19 21:05:45 | ||
*/ | ||
public class GlueJobHandler extends IJobHandler { | ||
|
||
private long glueUpdatetime; | ||
private IJobHandler jobHandler; | ||
public GlueJobHandler(IJobHandler jobHandler, long glueUpdatetime) { | ||
this.jobHandler = jobHandler; | ||
this.glueUpdatetime = glueUpdatetime; | ||
} | ||
public long getGlueUpdatetime() { | ||
return glueUpdatetime; | ||
} | ||
|
||
@Override | ||
public void execute() throws Exception { | ||
XxlJobHelper.log("----------- glue.version:"+ glueUpdatetime +" -----------"); | ||
jobHandler.execute(); | ||
} | ||
|
||
@Override | ||
public void init() throws Exception { | ||
this.jobHandler.init(); | ||
} | ||
|
||
@Override | ||
public void destroy() throws Exception { | ||
this.jobHandler.destroy(); | ||
} | ||
} |