From 3255012fba9c8722e319f7a0298f60c43dc4e4f3 Mon Sep 17 00:00:00 2001 From: vu-tran Date: Wed, 18 Jun 2025 10:35:08 +0700 Subject: [PATCH] turn off india stock task --- .../cn/stock/market/infrastructure/job/InvestingTask.java | 2 +- .../cn/stock/market/infrastructure/job/RealTimeTask.java | 4 ++-- .../java/cn/stock/market/infrastructure/job/Scraper.java | 6 +++--- .../java/cn/stock/market/infrastructure/job/StockTask.java | 4 ++-- src/main/resources/application-base-alpha.yml | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/cn/stock/market/infrastructure/job/InvestingTask.java b/src/main/java/cn/stock/market/infrastructure/job/InvestingTask.java index 52d9c69..3fb5442 100644 --- a/src/main/java/cn/stock/market/infrastructure/job/InvestingTask.java +++ b/src/main/java/cn/stock/market/infrastructure/job/InvestingTask.java @@ -110,7 +110,7 @@ public class InvestingTask { } /*新闻接口*/ - @Scheduled(cron = "0 0 0/3 * * ?") +// @Scheduled(cron = "0 0 0/3 * * ?") public void saveStockNews() { log.info("英文股票新闻数据同步开始"); try { diff --git a/src/main/java/cn/stock/market/infrastructure/job/RealTimeTask.java b/src/main/java/cn/stock/market/infrastructure/job/RealTimeTask.java index 3108955..c1adec1 100644 --- a/src/main/java/cn/stock/market/infrastructure/job/RealTimeTask.java +++ b/src/main/java/cn/stock/market/infrastructure/job/RealTimeTask.java @@ -16,7 +16,7 @@ public class RealTimeTask { /*每天9点定时删除股票k线数据*/ @Transactional - @Scheduled(cron = "0 00 9 * * MON-FRI") +// @Scheduled(cron = "0 00 9 * * MON-FRI") public void deleteStockCode() { log.info("每天9点定时删除股票k线数据"); repo.deleteStockCode(); @@ -24,7 +24,7 @@ public class RealTimeTask { /*每天0点定时删除期货k线数据*/ @Transactional - @Scheduled(cron = "0 00 0 * * MON-FRI") +// @Scheduled(cron = "0 00 0 * * MON-FRI") public void deleteStockFuturesCode() { log.info("每天0点定时删除期货k线数据"); repo.deleteStockFuturesCode(); diff --git a/src/main/java/cn/stock/market/infrastructure/job/Scraper.java b/src/main/java/cn/stock/market/infrastructure/job/Scraper.java index c2d80af..a688f0e 100644 --- a/src/main/java/cn/stock/market/infrastructure/job/Scraper.java +++ b/src/main/java/cn/stock/market/infrastructure/job/Scraper.java @@ -63,7 +63,7 @@ public class Scraper { private boolean times = false; - @Scheduled(cron = "0 0 1 */2 * ?") +// @Scheduled(cron = "0 0 1 */2 * ?") @RequestMapping("/testScraperGetBusinessToday") public void schedule() { String BASE_URL = "https://akm-img-a-in.tosshub.com/businesstoday/resource/market-widgets/prod/company-master-23-01-2023.json"; @@ -110,7 +110,7 @@ public class Scraper { - @Scheduled(cron = "0 0 18 * * ?") +// @Scheduled(cron = "0 0 18 * * ?") // @PostConstruct @RequestMapping("/testScraperGetMoneyControllerNewIPO") public void getMoneyControllerNewIPOSchedule() { @@ -303,7 +303,7 @@ public class Scraper { } - @Scheduled(cron = "0 0 19 * * ?") +// @Scheduled(cron = "0 0 19 * * ?") @PostConstruct @RequestMapping("/addMoneyStock") public void addMoneyStock() { diff --git a/src/main/java/cn/stock/market/infrastructure/job/StockTask.java b/src/main/java/cn/stock/market/infrastructure/job/StockTask.java index eec6087..de7afda 100644 --- a/src/main/java/cn/stock/market/infrastructure/job/StockTask.java +++ b/src/main/java/cn/stock/market/infrastructure/job/StockTask.java @@ -112,7 +112,7 @@ public class StockTask { } /*同步股票列表*/ - @Scheduled(cron = "0 0 6 * * ?") +// @Scheduled(cron = "0 0 6 * * ?") public void syncAFutureStockList() { PageInfo info = EastmoneyApi.ipoApplyDate(1, 300); Map stockMap = StockRepository.of().cacheCodeMap(); @@ -154,7 +154,7 @@ public class StockTask { } /*同步股票列表*/ - @Scheduled(cron = "0 0 6 * * ?") +// @Scheduled(cron = "0 0 6 * * ?") public void syncAStockList() { MdcUtil.setTraceIdIfAbsent(); Config config = SpringUtils.getBean(Config.class); diff --git a/src/main/resources/application-base-alpha.yml b/src/main/resources/application-base-alpha.yml index 9b896bb..4ae3fcb 100644 --- a/src/main/resources/application-base-alpha.yml +++ b/src/main/resources/application-base-alpha.yml @@ -3,9 +3,9 @@ spring: show-sql: true # Redis配置 redis: - host: 43.153.174.179 + host: 43.153.142.41 password: a5v8b86P4mVzFlUqJV - port: 30001 + port: 30041 database: 1 lettuce: pool: @@ -17,7 +17,7 @@ spring: datasource: stock-market: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://43.153.174.179:30000/india_stock?useUnicode=true&characterEncoding=utf-8 + url: jdbc:mysql://43.153.142.41:30040/germany_stock?useUnicode=true&characterEncoding=utf-8 username: root password: uNejHIFQGJOUtYTmE maxActive: 500