超时修改

bozhou-古井贡酒
LAPTOP-S9HJSOEB\昊天 2 months ago
parent 881dcbb1ae
commit c8a8ccc8e2

@ -46,6 +46,8 @@ public class ConfigProperties {
private Integer orderTest = 0; private Integer orderTest = 0;
private String productDoc; private String productDoc;
private List<SmokeBoxType> smokeBoxType; private List<SmokeBoxType> smokeBoxType;
String deleteFileCron = "0 0 12 * * ?";
int spaceGB = 150;
@Data @Data
public static class SmokeBoxType{ public static class SmokeBoxType{

@ -11,7 +11,7 @@ public class RestTemplateConfig {
public RestTemplate restTemplate() { public RestTemplate restTemplate() {
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory(); SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
// 设置连接超时时间(单位:毫秒) // 设置连接超时时间(单位:毫秒)
factory.setConnectTimeout(1000); factory.setConnectTimeout(5000);
// 设置读取数据超时时间(单位:毫秒) // 设置读取数据超时时间(单位:毫秒)
factory.setReadTimeout(50000); factory.setReadTimeout(50000);

@ -58,7 +58,7 @@ public class CronTab {
private static int gByte = 1024* 1024 * 1024; private static int gByte = 1024* 1024 * 1024;
@Scheduled(cron = "0 0 0 * * ?") @Scheduled(cron = "${cameraConfig.cameraTimeUpdateCron}")
//@Scheduled(cron = "0 0/1 * * * *") //@Scheduled(cron = "0 0/1 * * * *")
public void file() { public void file() {
log.info(" corn delete file"); log.info(" corn delete file");
@ -66,7 +66,7 @@ public class CronTab {
File dir = new File(configProperties.getSavePath().getMediaPath()); File dir = new File(configProperties.getSavePath().getMediaPath());
long space = dir.getFreeSpace() / gByte; long space = dir.getFreeSpace() / gByte;
log.info(" free space :{}",space); log.info(" free space :{}",space);
if(space > 150){ if(space > configProperties.getSpaceGB()){
return; return;
} }
checkFileTime(dir,configProperties.getDeleteFileDays()); checkFileTime(dir,configProperties.getDeleteFileDays());

@ -59,6 +59,7 @@ public class LightSourceService {
} catch (IOException e) { } catch (IOException e) {
log.error("ip:{}",ip,e);
}finally { }finally {
if(os != null){ if(os != null){

@ -822,6 +822,7 @@ public class PlcService {
stock.setWmsCategory(algorithmPojo.getGoodsType()); stock.setWmsCategory(algorithmPojo.getGoodsType());
stock.setWmsCount(algorithmPojo.getGoodsNumber()); stock.setWmsCount(algorithmPojo.getGoodsNumber());
stock.setCheckPic(path); stock.setCheckPic(path);
stock.setCountTop(0);
stock.setPreoperationPic(paths); stock.setPreoperationPic(paths);
stock.setCheckNum(plcCmdInfo.getOrderNum()); stock.setCheckNum(plcCmdInfo.getOrderNum());
stockMapper.updateById(stock); stockMapper.updateById(stock);

@ -62,6 +62,7 @@ savePath:
mp4Path: d://data/mp4/ mp4Path: d://data/mp4/
# ------------服务端类型 0:TCP(罗伯泰克) 1:KSEC(JSON)(昆船) # ------------服务端类型 0:TCP(罗伯泰克) 1:KSEC(JSON)(昆船)
serverMode: 1 serverMode: 1
deleteFileCron: "0 0 12 * * ?"
ksec: ksec:
ip: 127.0.0.1 ip: 127.0.0.1
port: 3000 port: 3000

Loading…
Cancel
Save