Commit a8f3e905 authored by 赵啸非's avatar 赵啸非

添加php健康度检测

parent 6ef973a1
......@@ -59,8 +59,6 @@ public class SetupDbServiceImpl implements SetupDbService {
} catch (Exception e) {
log.error("初始化数据库异常", e);
}finally {
}
return Rest.ok("初始化数据成功!");
}
......
......@@ -237,7 +237,7 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec
} catch (IOException e) {
log.error(e.getMessage());
}
callScript("project_deploy.sh", "4", sourcePath);
callScript("project_deploy.sh", "4", destDir.getPath());
} else if (SystemUtil.getOsInfo().isWindows()) {
//todo
}
......
......@@ -238,9 +238,18 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
SetupProjectEntity setupProject = this.service.get(siteEntity.getId());
if (ObjectUtils.isEmpty(setupProject)) throw new AppException("未找到项目信息");
if (ObjectUtils.isEmpty(setupProject.getSiteId())) throw new AppException("请同步更新站点信息!");
//基础服务必须运行中
SetupProjectQuery query = new SetupProjectQuery();
query.setProjectCodeList(Arrays.asList(基础服务后端.getValue(), 网关服务.getValue()));
List<SetupProjectEntity> setupProjectEntities = this.service.find(query);
for (SetupProjectEntity setupProjectEntity : setupProjectEntities) {
if (ProjectStatusEnum.运行中.getValue() != setupProjectEntity.getProjectStatus()) {
throw new AppException(String.format("%s服务状态未运行,请等待服务运行后再进行事项数据同步!", setupProjectEntity.getName()));
}
}
try {
HashMap<String, Object> params = new HashMap<>();
params.put("id", setupProject.getSiteId());
......
......@@ -11,6 +11,9 @@ spring:
multipart:
max-file-size: 2048MB
max-request-size: 2048MB
dao:
exceptiontranslation:
enabled: false
# redis:
# host: @profiles.redis.uri@
# port: @profiles.redis.port@
......
......@@ -476,6 +476,10 @@ init_deploy() {
if [ ! -d "/mortals/app/data" ]; then
mkdir -p /mortals/app/data
writelog "解压资源文件..."
tar -xvf $BASEDIR/release/resource/mortals.tar.gz -C /
writelog "解压资源文件完成"
chmod -R 755 /mortals
fi
......@@ -484,17 +488,12 @@ init_deploy() {
chmod -R 755 /mortals
fi
if [ ! -d "/home/logs/" ]; then
mkdir -p /home/logs/
chmod -R 755 /home/logs/
fi
writelog "创建文件目录完成"
writelog "解压资源文件..."
tar -xvf $BASEDIR/release/resource/mortals.tar.gz -C /
chmod -R 755 /mortals
writelog "解压资源文件完成"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment