mirror of https://gitee.com/maxjhandsome/pig
新增任务追踪信息保存
This commit is contained in:
parent
23815654da
commit
19e9af7f6f
|
@ -59,6 +59,27 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
<exclusions>
|
||||
<!--去掉默认的tomcat-jdbc的依赖-->
|
||||
<exclusion>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>tomcat-jdbc</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!--HikariCP连接池-->
|
||||
<dependency>
|
||||
<groupId>com.zaxxer</groupId>
|
||||
<artifactId>HikariCP</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -12,9 +12,10 @@ import lombok.extern.slf4j.Slf4j;
|
|||
*/
|
||||
@Slf4j
|
||||
@ElasticJobConfig(cron = "0/2 * * * * ?", shardingTotalCount = 3,
|
||||
shardingItemParameters = "0=Beijing,1=Shanghai,2=Guangzhou",
|
||||
shardingItemParameters = "0=pig1,1=pig2,2=pig3",
|
||||
startedTimeoutMilliseconds = 5000L,
|
||||
completedTimeoutMilliseconds = 10000L)
|
||||
completedTimeoutMilliseconds = 10000L,
|
||||
eventTraceRdbDataSource = "dataSource")
|
||||
public class DemoSimpleJob implements SimpleJob {
|
||||
/**
|
||||
* 业务执行逻辑
|
||||
|
|
Loading…
Reference in New Issue