zhang
8 小时以前 70930071a49190f414c8d8bc9c9e9795a4096739
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/AvoidWaveCalculator.java
@@ -26,6 +26,7 @@
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Component;
import com.zy.acs.common.utils.News;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
@@ -92,7 +93,7 @@
        try {
            if (!(lockAcquired = lock.tryLock(LOCK_TIMEOUT, TimeUnit.SECONDS))) {
                log.warn("AvoidWaveCalculator execute fail, cause can not acquire lock ...");
                News.warn("AvoidWaveCalculator execute fail, cause can not acquire lock ...");
                return false;
            }
@@ -101,7 +102,7 @@
        } catch (Exception e) {
            log.error(this.getClass().getSimpleName(), e);
            News.error(this.getClass().getSimpleName(), e);
            return false;
        } finally {
@@ -111,14 +112,14 @@
            long during = System.currentTimeMillis() - startTime;
            if (during > 50) {
                log.info("滤波函数花费时间为:{}毫秒......", during);
                News.info("滤波函数花费时间为:{}毫秒......", during);
            }
        }
    }
//    private boolean calcWaveScopeByPython(Integer lev, AgvModel agvModel) throws Exception {
//        if (null == agvModel.getDiameter() || agvModel.getDiameter() <= 0) {
//            log.warn("There is no diameter or diameter value was wrong...");
//            News.warn("There is no diameter or diameter value was wrong...");
//        }
//
//        // python
@@ -151,8 +152,8 @@
//
//        int exitCode = process.waitFor();
//        if (exitCode != 0) {
//            log.error("Python script exited with error code: {}", exitCode);
//            log.error("python error:{}", builder.toString());
//            News.error("Python script exited with error code: {}", exitCode);
//            News.error("python error:{}", builder.toString());
//            return false;
//        }
//        reader.close();
@@ -167,7 +168,7 @@
//            return false;
//        }
//        if (!"1".equals(result)) {
//            log.error("Failed to call python");
//            News.error("Failed to call python");
//            return false;
//        }
//