File tree Expand file tree Collapse file tree 7 files changed +14
-6
lines changed
java/com/cc/etherscan/io/schedule Expand file tree Collapse file tree 7 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 127
127
<profile >
128
128
<id >tar-build</id >
129
129
<build >
130
+ <finalName >${project.artifactId} </finalName >
130
131
<plugins >
131
132
<plugin >
132
133
<groupId >org.apache.maven.plugins</groupId >
Original file line number Diff line number Diff line change 4
4
import com .cc .etherscan .io .pipeline .EthereumPipeline ;
5
5
import com .cc .etherscan .io .processor .EthereumContractProcessor ;
6
6
import org .springframework .beans .factory .annotation .Value ;
7
+ import org .springframework .boot .autoconfigure .condition .ConditionalOnProperty ;
7
8
import org .springframework .data .redis .core .RedisTemplate ;
9
+ import org .springframework .scheduling .annotation .EnableScheduling ;
8
10
import org .springframework .scheduling .annotation .Scheduled ;
9
11
import org .springframework .stereotype .Component ;
10
12
import us .codecraft .webmagic .Spider ;
11
13
14
+ import javax .annotation .PostConstruct ;
12
15
import javax .annotation .Resource ;
13
16
14
17
/**
@@ -42,7 +45,8 @@ public class EtherEumSchedule {
42
45
@ Value ("${etherscan.intervalSeconds}" )
43
46
private int intervalSeconds = 4 ;
44
47
45
- @ Scheduled (cron ="${etherscan.scanIntervalCron}" )
48
+ //@Scheduled(cron="${etherscan.scanIntervalCron}")
49
+ @ PostConstruct
46
50
public void start () {
47
51
for (int i = startPage ; i <= totalPage ; i ++) {
48
52
Spider .create (new EthereumContractProcessor (redisTemplate , etherContractMapper ))
Original file line number Diff line number Diff line change 2
2
redis :
3
3
host : 127.0.0.1
4
4
port : 10179
5
+ password : 2aVzLk8jcmJHh8Xo
5
6
datasource :
6
7
url : jdbc:mysql://127.0.0.1:3307/esc?useUnicode=true&characterEncoding=utf8
7
8
username : esc
8
- password : esc
9
+ password : d8Mo9u1JroPbKtXG
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ mybatis-plus:
39
39
configuration :
40
40
map-underscore-to-camel-case : true
41
41
cache-enabled : false
42
+ scheduling :
43
+ enabled : true
42
44
etherscan :
43
45
pageSize : 100
44
46
startPage : 1
Original file line number Diff line number Diff line change 22
22
<directory >${project.build.directory}</directory >
23
23
<outputDirectory >lib</outputDirectory >
24
24
<includes >
25
- <include >${project.artifactId}-${project.version} .jar</include >
25
+ <include >${project.artifactId}.jar</include >
26
26
</includes >
27
27
<fileMode >755</fileMode >
28
28
</fileSet >
Original file line number Diff line number Diff line change 7
7
<property name =" now" value =" sysdate" dbms =" mysql" />
8
8
9
9
<!-- 原则上,这里只留下以项目模块为单位的include, 名字建议采用模块全名-->
10
- <!-- < include file="classpath:changelog/ether-contract-changelog.xml"/> -- >
10
+ <include file =" classpath:changelog/ether-contract-changelog.xml" />
11
11
12
12
13
13
</databaseChangeLog >
Original file line number Diff line number Diff line change 6
6
</encoder >
7
7
</appender >
8
8
<appender name =" FILE" class =" ch.qos.logback.core.rolling.RollingFileAppender" >
9
- <file >${APP_HOME}/logs/spider .log</file >
9
+ <file >${APP_HOME}/logs/etherscan .log</file >
10
10
<rollingPolicy class =" ch.qos.logback.core.rolling.FixedWindowRollingPolicy" >
11
- <fileNamePattern >${APP_HOME}/logs/spider .%i.log.zip</fileNamePattern >
11
+ <fileNamePattern >${APP_HOME}/logs/etherscan .%i.log.zip</fileNamePattern >
12
12
<minIndex >1</minIndex >
13
13
<maxIndex >3</maxIndex >
14
14
</rollingPolicy >
You can’t perform that action at this time.
0 commit comments