File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
java/com/cc/etherscan/io/schedule Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public class EtherEumSchedule {
42
42
@ Value ("${etherscan.intervalSeconds}" )
43
43
private int intervalSeconds = 4 ;
44
44
45
- @ Scheduled (cron ="0 0/5 * * * ? " )
45
+ @ Scheduled (cron ="${etherscan.scanIntervalCron} " )
46
46
public void start () {
47
47
for (int i = startPage ; i <= totalPage ; i ++) {
48
48
Spider .create (new EthereumContractProcessor (redisTemplate , etherContractMapper ))
Original file line number Diff line number Diff line change 8
8
pool-name : ESC-POOL
9
9
connection-test-query : SELECT 1 FROM DUAL
10
10
profiles :
11
- active : test
11
+ active : dev
12
12
liquibase :
13
13
change-log : classpath:db-changelog.xml
14
14
mybatis-plus :
@@ -44,4 +44,5 @@ etherscan:
44
44
startPage : 1
45
45
totalPage : 1
46
46
threadCount : 1
47
- intervalSeconds : 1
47
+ intervalSeconds : 1
48
+ scanIntervalCron : 0 0/5 * * * ?
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ START_PAGE=$3
16
16
TOTAL_PAGE=$4
17
17
THREAD_COUNT=$5
18
18
INTERVAL_SECONDS=$6
19
+ SCAN_INTERVAL=$7
19
20
20
21
if [ -z $JAVA_HOME ]; then
21
22
echo " ERROR: JAVA_HOME is not found in your Environment."
@@ -40,4 +41,4 @@ MAX_HEAP=2G
40
41
41
42
JAVA_OPTS=" -server -Xmx$MAX_HEAP -Xms$MAX_HEAP -Xmn256m -Xss512k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Duser.timezone=GMT+8"
42
43
# # -Detherscan.startPage=1
43
- nohup $JAVA_HOME /bin/java -DAPP_HOME=$APP_HOME -Dspring.profiles.active=$ACTIVE_PROFILE -Detherscan.startPage=$START_PAGE -Detherscan.pageSize=$PAGE_SIZE -Detherscan.totalPage=$TOTAL_PAGE -Detherscan.threadCount=$THREAD_COUNT -Detherscan.intervalSeconds=$INTERVAL_SECONDS -cp $CP $JAVA_OPTS -Xloggc:$APP_HOME /logs/gc.log org.springframework.boot.loader.JarLauncher --server.tomcat.basedir=$APP_HOME /logs --server.tomcat.access-log-enabled=true --server.tomcat.accesslog.directory=$APP_HOME /logs --server.tomcat.access-log-pattern=' %{X-FORWARDED-FOR}i %l %u %t "%r" %s %b %D %q "%{User-Agent}i" %T' > /dev/null 2>&1 &
44
+ nohup $JAVA_HOME /bin/java -DAPP_HOME=$APP_HOME -Dspring.profiles.active=$ACTIVE_PROFILE -Detherscan.startPage=$START_PAGE -Detherscan.pageSize=$PAGE_SIZE -Detherscan.totalPage=$TOTAL_PAGE -Detherscan.threadCount=$THREAD_COUNT -Detherscan.intervalSeconds=$INTERVAL_SECONDS -Detherscan.scanIntervalCron= $SCAN_INTERVAL - cp $CP $JAVA_OPTS -Xloggc:$APP_HOME /logs/gc.log org.springframework.boot.loader.JarLauncher --server.tomcat.basedir=$APP_HOME /logs --server.tomcat.access-log-enabled=true --server.tomcat.accesslog.directory=$APP_HOME /logs --server.tomcat.access-log-pattern=' %{X-FORWARDED-FOR}i %l %u %t "%r" %s %b %D %q "%{User-Agent}i" %T' > /dev/null 2>&1 &
You can’t perform that action at this time.
0 commit comments