Helius
2021-04-22 16a0ee15923907df48db2266e8c2e80d10c7f2b9
src/main/java/com/xcong/excoin/quartz/job/BlockCoinUpdateJob.java
@@ -6,8 +6,10 @@
import com.xcong.excoin.modules.member.dao.MemberCoinAddressDao;
import com.xcong.excoin.modules.member.entity.MemberCoinAddressEntity;
import com.xcong.excoin.utils.RedisUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -20,6 +22,7 @@
 * @author wzy
 * @date 2020-07-02
 **/
@Slf4j
@Component
@ConditionalOnProperty(prefix = "app", name = "block-job", havingValue = "true")
public class BlockCoinUpdateJob {
@@ -37,6 +40,7 @@
     * TRC20_USDT 同步
     */
    @Scheduled(cron = "0/3 * * * * ? ")
    @Async
    public void usdtTc20Update() {
        // 波场3秒出一个块
        trxUsdtUpdateService.monitorCoinListener();
@@ -54,7 +58,7 @@
    /**
     * eth 同步
     */
    @Scheduled(cron = "0 1/20 * * * ? ")
//    @Scheduled(cron = "0 1/20 * * * ? ")
    public void ethUpdate() {
        blockCoinService.updateEth();
    }