新增任务追踪信息保存

This commit is contained in:
大帅比冷冷 2018-02-08 17:45:24 +08:00
parent 23815654da
commit 19e9af7f6f
2 changed files with 24 additions and 2 deletions

View File

@ -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>

View File

@ -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 {
/**
* 业务执行逻辑