From 3db83ef4add286feabba2d5db4eabfa27d5fc5f1 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Tue, 25 May 2021 17:13:24 +0800 Subject: [PATCH] Merge branch 'yunding' of http://120.27.238.55:7000/r/exchange into yunding --- src/main/java/com/xcong/excoin/quartz/job/XchBaseDataUpdateJob.java | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/xcong/excoin/quartz/job/XchBaseDataUpdateJob.java b/src/main/java/com/xcong/excoin/quartz/job/XchBaseDataUpdateJob.java index ebd0074..78a51d4 100644 --- a/src/main/java/com/xcong/excoin/quartz/job/XchBaseDataUpdateJob.java +++ b/src/main/java/com/xcong/excoin/quartz/job/XchBaseDataUpdateJob.java @@ -37,11 +37,12 @@ private XchProfitService xchProfitService; // @Scheduled(cron = "0 0 0/10 * * ? ") - @Scheduled(cron = "0 0/20 * * * ? ") + @Scheduled(cron = "0 0/10 * * * ? ") public void baseDataUpdate() { log.info("基础数据更新任务"); // 请求价格等数据 "https://api2.chiaexplorer.com/blockchainSummary" String result = pyExec(); + log.info("result======>>{}", result); // 每t预计收益 // String profitPerT = execCurl("https://api2.chiaexplorer.com/chart/xchTibDay?period=2w"); // @@ -119,8 +120,6 @@ } public static void main(String[] args) { - - // System.out.println(HttpRequest.get("https://www.chiaexplorer.com").execute().body()); // System.out.println(execCurl(cmds)); } @@ -156,10 +155,8 @@ public String pyExec() { String result = ""; - String path = ClassUtils.getDefaultClassLoader().getResource("").getPath(); - String filePath = path + "static/xch.py"; try { - Process process = Runtime.getRuntime().exec("python3 " + filePath); + Process process = Runtime.getRuntime().exec("python2.7 /home/javaweb/yunding/xch.py"); process.waitFor(); InputStreamReader ir = new InputStreamReader(process.getInputStream()); LineNumberReader input = new LineNumberReader(ir); -- Gitblit v1.9.1