修改正式服务器地址

master
whb 8 months ago
parent df8ed9b06d
commit 15c3cc4358

@ -57,15 +57,15 @@ public class StuJupyterController {
private AdminJupyterTokenMapper adminJupyterTokenMapper;
@Scheduled(cron = "0 0 0 * * ?")
@Scheduled(cron = "0 30 12 * * ?")
public void updateToken() throws IOException, InterruptedException {
log.info("定时任务:==================获取jupyterToken======================");
// //删除全部文件
// AdminJupyterTokenExample tokenExample = new AdminJupyterTokenExample();
// tokenExample.createCriteria().getAllCriteria();
// adminJupyterTokenMapper.deleteByExample(tokenExample);
AdminJupyterTokenExample tokenExample = new AdminJupyterTokenExample();
tokenExample.createCriteria().getAllCriteria();
adminJupyterTokenMapper.deleteByExample(tokenExample);
String[] command = {"docker", "exec", "jupytertch", "jupyter", "server", "list"};
@ -98,8 +98,6 @@ public class StuJupyterController {
}
String[] commandStu = {"docker", "exec", "jupyterstu", "jupyter", "server", "list"};
Map map1 = connectdocker(commandStu);
@ -200,9 +198,9 @@ public class StuJupyterController {
// 等待进程执行完成
int exitCodeInfo = process.waitFor();
if (exitCodeInfo == 0) {
return new ResultEntity<>(HttpStatus.OK, "导出成功");
return new ResultEntity<>(HttpStatus.OK, "发布成功");
} else {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "导出失败!请联系管理员");
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "发布失败!请联系管理员");
}
} else {
@ -210,7 +208,7 @@ public class StuJupyterController {
Object err = map.get("errors");
String errors = Convert.toStr(err);
System.err.println("Error executing Python code:\n" + errors.toString());
return new ResultEntity(HttpStatus.OK, errors.toString());
return new ResultEntity(HttpStatus.BAD_REQUEST, "发布失败!请联系管理员");
}
}
@ -267,7 +265,7 @@ public class StuJupyterController {
} else {
return new ResultEntity<>(HttpStatus.OK, "文件不存在!", false);
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "文件不存在!", false);
}
} else {
System.out.println("该目录不存在或不是一个目录");
@ -539,9 +537,9 @@ public class StuJupyterController {
// 等待进程执行完成
int exitCodeInfo = process.waitFor();
if (exitCodeInfo == 0) {
return new ResultEntity<>(HttpStatus.OK, "导出成功");
return new ResultEntity<>(HttpStatus.OK, "更新成功");
} else {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "导出失败!请联系管理员");
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "更新失败!请联系管理员");
}
} else {
return new ResultEntity<>(HttpStatus.OK,"更新成功!");
@ -552,7 +550,7 @@ public class StuJupyterController {
Object err = map.get("errors");
String errors = Convert.toStr(err);
System.err.println("Error executing Python code:\n" + errors.toString());
return new ResultEntity(HttpStatus.OK, errors.toString());
return new ResultEntity(HttpStatus.BAD_REQUEST, "更新失败!");
}

@ -27,4 +27,4 @@ swagger:
tch:
serverAddress: http://118.31.7.2:9998
serverAddress: http://120.79.54.255:9998

Loading…
Cancel
Save