Compare commits

...

6 Commits

Author SHA1 Message Date
weiweiw 658c554c8c 修改部署脚本和配置,部署到0.16服务器上 2025-01-24 16:29:29 +08:00
weiweiw 141673020d 修改部署脚本和配置,部署到0.16服务器上 2025-01-24 13:14:21 +08:00
weiweiw f027fa6c3f 修改部署脚本和配置,部署到0.16服务器上 2025-01-24 13:11:52 +08:00
weiweiw a563ba96c2 修改无限超时返回的报错 2025-01-23 16:03:18 +08:00
jiang e85e026edd Merge remote-tracking branch 'origin/main' 2025-01-12 15:20:37 +08:00
jiang 34261acf7d 提交代码 2025-01-12 15:20:25 +08:00
14 changed files with 83 additions and 49 deletions

View File

@ -21,8 +21,8 @@ public class IntelligentAnnotationServiceOkHttp {
private static final OkHttpClient client = new OkHttpClient.Builder()
.connectTimeout(10, TimeUnit.SECONDS)
.readTimeout(60, TimeUnit.SECONDS)
.writeTimeout(60, TimeUnit.SECONDS).build();
.readTimeout(0, TimeUnit.SECONDS)
.writeTimeout(0, TimeUnit.SECONDS).build();
private static final ObjectMapper objectMapper = new ObjectMapper(); // 用于JSON序列化和反序列化

View File

@ -91,7 +91,7 @@ public class IntelligentAnnotationServiceImpl implements IntelligentAnnotationSe
log.error("远程调用智能标注服务,没有返回标注结果");
return AjaxResult.error("智能标注失败");
}
log.info("远程调用智能标注服务已返回");
// 获取 annotations 的值
Map<String, List<AnnotationResult.Annotation>> annotations = result.getAnnotations();

View File

@ -21,13 +21,17 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 192.168.0.14:8848
namespace: f648524d-0a7b-449e-8f92-64e05236fd51
server-addr: 192.168.0.16:18848
namespace: bonus-ai
username: nacos
password: nacos
config:
# 配置中心地址
server-addr: 192.168.0.14:8848
namespace: f648524d-0a7b-449e-8f92-64e05236fd51
server-addr: 192.168.0.16:18848
namespace: bonus-ai
username: nacos
password: nacos
# 配置文件格式
file-extension: yml

View File

@ -66,7 +66,7 @@
<select id="selectVersionName" resultType="java.lang.Integer">
SELECT COUNT(*)
FROM ai_dataset_version
WHERE version_name = #{versionName}
WHERE version_name = #{versionName} and dataset_id = #{datasetId}
</select>
</mapper>

View File

@ -21,12 +21,12 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
namespace: 9e2bf9d8-4515-4dfb-aeac-e10bc2b26294
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
namespace: 9e2bf9d8-4515-4dfb-aeac-e10bc2b26294
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -16,12 +16,12 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
namespace: 9e2bf9d8-4515-4dfb-aeac-e10bc2b26294
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
namespace: 9e2bf9d8-4515-4dfb-aeac-e10bc2b26294
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -1,6 +1,6 @@
#!/bin/bash
export deploy_path=/opt/webapps/bonus-ai-v2
export deploy_path=/data/ceshi/gqk/bonus-ai-v2
export app_workspace=/home/jenkins/workspace/Bonus-Cloud
export ai_workspace=/home/jenkins/workspace/Bonus-Cloud-AI-V2
@ -12,12 +12,9 @@ app_source_jars=(
"bonus-auth/target/bonus-auth.jar"
"bonus-gateway/target/bonus-gateway.jar"
"bonus-modules/bonus-system/target/bonus-system.jar"
"bonus-modules/bonus-file/target/bonus-file.jar"
)
#for source_jar in "${app_source_jars[@]}"; do
# cp -f ${app_workspace}/${source_jar} $deploy_path
# echo "copied ${app_workspace}/${source_jar} to $deploy_path"
#done
for source_jar in "${app_source_jars[@]}"; do
# 获取文件名(不带目录路径)
filename=$(basename "$source_jar")
@ -29,17 +26,18 @@ for source_jar in "${app_source_jars[@]}"; do
new_filename="${base_name}${suffix}.jar"
echo "filename:$new_filename"
cp -f ${app_workspace}/${source_jar} "$deploy_path/$new_filename"
scp "root@192.168.0.56:"${app_workspace}/${source_jar} "$deploy_path/$new_filename"
echo "copied ${app_workspace}/${source_jar} to '$deploy_path/$new_filename'"
done
cp -f ${ai_workspace}/"bonus-modules/bonus-ai/target/bonus-modules-ai-v2.jar" $deploy_path
scp "root@192.168.0.56:"${ai_workspace}/"bonus-modules/bonus-ai/target/bonus-modules-ai-v2.jar" $deploy_path
echo "copied ${app_workspace}/${source_jar} to $deploy_path"
# Define an array of JAR files to run
jars=("bonus-auth-ai-v2.jar --spring.config.location=file:auth_bootstrap.yml"
"bonus-gateway-ai-v2.jar --spring.config.location=file:gateway_bootstrap.yml"
"bonus-system-ai-v2.jar --spring.config.location=file:system_bootstrap.yml")
"bonus-system-ai-v2.jar --spring.config.location=file:system_bootstrap.yml"
"bonus-file-ai-V2.jar --spring.config.location=file:file_bootstrap.yml")
# 遍历数组并检查每个JAR文件的进程
for jar_with_args in "${jars[@]}"; do
@ -70,7 +68,7 @@ cd $deploy_path || { echo "Failed to change directory to $deploy_path"; exit 1;
# Iterate over the JAR files array
for jar in "${jars[@]}"; do
echo "Starting $jar"
nohup /usr/lib/jvm/jdk1.8.0_381/bin/java -jar $jar >/dev/null 2>&1 &
nohup java -jar $jar >/dev/null 2>&1 &
done
echo "All JARs have been run successfully."

View File

@ -16,12 +16,12 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 192.168.0.56:8848
namespace: 39c95294-eb64-4096-ada1-30a215bdd511
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 192.168.0.56:8848
namespace: 39c95294-eb64-4096-ada1-30a215bdd511
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -17,12 +17,12 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
namespace: 9e2bf9d8-4515-4dfb-aeac-e10bc2b26294
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
namespace: 9e2bf9d8-4515-4dfb-aeac-e10bc2b26294
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -16,12 +16,12 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
namespace: 9e2bf9d8-4515-4dfb-aeac-e10bc2b26294
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
namespace: 9e2bf9d8-4515-4dfb-aeac-e10bc2b26294
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -16,12 +16,12 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 192.168.0.56:8848
namespace: 39c95294-eb64-4096-ada1-30a215bdd511
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 192.168.0.56:8848
namespace: 39c95294-eb64-4096-ada1-30a215bdd511
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml
# 共享配置

32
scripts/stopServices.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
# Define an array of JAR files to run
jars=("bonus-auth-ai-v2.jar --spring.config.location=file:auth_bootstrap.yml"
"bonus-gateway-ai-v2.jar --spring.config.location=file:gateway_bootstrap.yml"
"bonus-system-ai-v2.jar --spring.config.location=file:system_bootstrap.yml"
"bonus-file-ai-V2.jar --spring.config.location=file:file_bootstrap.yml")
# 遍历数组并检查每个JAR文件的进程
for jar_with_args in "${jars[@]}"; do
# 提取JAR文件名不包括参数
jar=$(echo $jar_with_args | awk '{print $1}')
# 检查进程是否启动
echo "原应用程序1 $jar "
pids=$(pgrep -f $jar || true)
echo "原应用程序2 $jar "
if [ -n "$pids" ]; then
echo "$jar is running with PID(s): $pids"
# 杀死进程
for pid in $pids; do
kill -9 $pid
if [ $? -eq 0 ]; then
echo "Process $pid for $jar killed successfully"
else
echo "Failed to kill process $pid for $jar"
fi
done
else
echo "$jar is not running"
fi
done

View File

@ -16,12 +16,12 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
namespace: 9e2bf9d8-4515-4dfb-aeac-e10bc2b26294
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
namespace: 9e2bf9d8-4515-4dfb-aeac-e10bc2b26294
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -16,12 +16,12 @@ spring:
password: nacos
discovery:
# 服务注册地址
server-addr: 192.168.0.56:8848
namespace: 39c95294-eb64-4096-ada1-30a215bdd511
server-addr: 192.168.0.16:18848
namespace: bonus-ai
config:
# 配置中心地址
server-addr: 192.168.0.56:8848
namespace: 39c95294-eb64-4096-ada1-30a215bdd511
server-addr: 192.168.0.16:18848
namespace: bonus-ai
# 配置文件格式
file-extension: yml
# 共享配置