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

添加php健康度检测

parent 6ef973a1
...@@ -59,8 +59,6 @@ public class SetupDbServiceImpl implements SetupDbService { ...@@ -59,8 +59,6 @@ public class SetupDbServiceImpl implements SetupDbService {
} catch (Exception e) { } catch (Exception e) {
log.error("初始化数据库异常", e); log.error("初始化数据库异常", e);
}finally {
} }
return Rest.ok("初始化数据成功!"); return Rest.ok("初始化数据成功!");
} }
......
...@@ -237,7 +237,7 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec ...@@ -237,7 +237,7 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec
} catch (IOException e) { } catch (IOException e) {
log.error(e.getMessage()); log.error(e.getMessage());
} }
callScript("project_deploy.sh", "4", sourcePath); callScript("project_deploy.sh", "4", destDir.getPath());
} else if (SystemUtil.getOsInfo().isWindows()) { } else if (SystemUtil.getOsInfo().isWindows()) {
//todo //todo
} }
......
...@@ -238,9 +238,18 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se ...@@ -238,9 +238,18 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
SetupProjectEntity setupProject = this.service.get(siteEntity.getId()); SetupProjectEntity setupProject = this.service.get(siteEntity.getId());
if (ObjectUtils.isEmpty(setupProject)) throw new AppException("未找到项目信息"); if (ObjectUtils.isEmpty(setupProject)) throw new AppException("未找到项目信息");
if (ObjectUtils.isEmpty(setupProject.getSiteId())) 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 { try {
HashMap<String, Object> params = new HashMap<>(); HashMap<String, Object> params = new HashMap<>();
params.put("id", setupProject.getSiteId()); params.put("id", setupProject.getSiteId());
......
...@@ -11,6 +11,9 @@ spring: ...@@ -11,6 +11,9 @@ spring:
multipart: multipart:
max-file-size: 2048MB max-file-size: 2048MB
max-request-size: 2048MB max-request-size: 2048MB
dao:
exceptiontranslation:
enabled: false
# redis: # redis:
# host: @profiles.redis.uri@ # host: @profiles.redis.uri@
# port: @profiles.redis.port@ # port: @profiles.redis.port@
......
...@@ -476,6 +476,10 @@ init_deploy() { ...@@ -476,6 +476,10 @@ init_deploy() {
if [ ! -d "/mortals/app/data" ]; then if [ ! -d "/mortals/app/data" ]; then
mkdir -p /mortals/app/data mkdir -p /mortals/app/data
writelog "解压资源文件..."
tar -xvf $BASEDIR/release/resource/mortals.tar.gz -C /
writelog "解压资源文件完成"
chmod -R 755 /mortals chmod -R 755 /mortals
fi fi
...@@ -484,17 +488,12 @@ init_deploy() { ...@@ -484,17 +488,12 @@ init_deploy() {
chmod -R 755 /mortals chmod -R 755 /mortals
fi fi
if [ ! -d "/home/logs/" ]; then if [ ! -d "/home/logs/" ]; then
mkdir -p /home/logs/ mkdir -p /home/logs/
chmod -R 755 /home/logs/ chmod -R 755 /home/logs/
fi fi
writelog "创建文件目录完成" 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