Explorar el Código

消费端,修改上传脚本命令-callLine +1

wuweihao hace 2 años
padre
commit
9fa61c09dd

+ 1 - 1
720yun_fd_consumer/gis_oss/src/main/java/com/gis/oss/command/CmdUtils.java

@@ -21,7 +21,7 @@ public class CmdUtils {
     public static void callShell(String command){
         log.info("cmd: {}", command);
         try {
-            String[] cmd = new String[]{"/bin/sh", "-c", command};
+            String[] cmd = new String[]{"/bin/sh", "-c", command + "&"};
             Process process = Runtime.getRuntime().exec(cmd);
             StreamGobblerLine errorGobbler = new StreamGobblerLine(process.getErrorStream(), "ERROR");
             errorGobbler.start();

+ 2 - 2
720yun_fd_consumer/gis_oss/src/main/java/com/gis/oss/util/AwsOssUtil.java

@@ -161,7 +161,7 @@ public class AwsOssUtil {
 
     public void uploadBySh(String filePath, String key) {
         String cmd = String.format(CmdConstant.UPLOAD_DIR, bucket, filePath, key , "aws");
-         // CmdUtils.callShell(cmd);
-        CmdUtils.callLine(cmd);
+          CmdUtils.callShell(cmd);
+//        CmdUtils.callLine(cmd);
     }
 }