mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
fix for the duplicate key error. The changes prevent duplicate plugin mappings from being inserted when creating new agents.
This commit is contained in:
parent
43f111af9a
commit
fc526d12f0
6 changed files with 37 additions and 13 deletions
27
ecosystem.config.js
Normal file
27
ecosystem.config.js
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
module.exports = {
|
||||||
|
apps: [
|
||||||
|
{
|
||||||
|
name: "manager-api",
|
||||||
|
script: "mvn",
|
||||||
|
args: "spring-boot:run",
|
||||||
|
cwd: "/root/xiaozhi-esp32-server/main/manager-api",
|
||||||
|
interpreter: "none" // important, tells PM2 not to use node/python
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "manager-web",
|
||||||
|
script: "npm",
|
||||||
|
args: "run serve",
|
||||||
|
cwd: "/root/xiaozhi-esp32-server/main/manager-web",
|
||||||
|
interpreter: "none"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "mqtt-gateway",
|
||||||
|
script: "app.js",
|
||||||
|
cwd: "/root/xiaozhi-esp32-server/main/mqtt-gateway",
|
||||||
|
interpreter: "node",
|
||||||
|
watch: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
@ -38,6 +38,7 @@ public class RenExceptionHandler {
|
||||||
|
|
||||||
@ExceptionHandler(DuplicateKeyException.class)
|
@ExceptionHandler(DuplicateKeyException.class)
|
||||||
public Result<Void> handleDuplicateKeyException(DuplicateKeyException ex) {
|
public Result<Void> handleDuplicateKeyException(DuplicateKeyException ex) {
|
||||||
|
log.error("Duplicate key error: {}", ex.getMessage(), ex);
|
||||||
Result<Void> result = new Result<>();
|
Result<Void> result = new Result<>();
|
||||||
result.error(ErrorCode.DB_RECORD_EXISTS);
|
result.error(ErrorCode.DB_RECORD_EXISTS);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,6 @@ knife4j:
|
||||||
password: 2ZABCDEUgF
|
password: 2ZABCDEUgF
|
||||||
setting:
|
setting:
|
||||||
enableFooter: false
|
enableFooter: false
|
||||||
|
|
||||||
# Server configuration
|
|
||||||
server:
|
|
||||||
secret: d153e93c-bb2f-42e7-8045-a1ee47a1dcfc
|
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
druid:
|
druid:
|
||||||
|
|
@ -22,9 +18,9 @@ spring:
|
||||||
# password: cTefiuLmZSMqGpcQImUmBIsUBhNyUvrK
|
# password: cTefiuLmZSMqGpcQImUmBIsUBhNyUvrK
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# Railway MySQL Configuration - Updated for Railway database
|
# Railway MySQL Configuration - Updated for Railway database
|
||||||
url: jdbc:mysql://crossover.proxy.rlwy.net:56145/railway?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&useSSL=true&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://nozomi.proxy.rlwy.net:25037/railway?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&useSSL=true&allowPublicKeyRetrieval=true
|
||||||
username: root
|
username: root
|
||||||
password: XjOWQwtGNcoMIELTjoMoaaBTfKiBjVcA
|
password: OcaVNLKcwNdyElfaeUPqvvfYZiiEHgdm
|
||||||
|
|
||||||
initial-size: 10
|
initial-size: 10
|
||||||
max-active: 100
|
max-active: 100
|
||||||
|
|
@ -50,9 +46,9 @@ spring:
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
# Railway Redis Configuration
|
# Railway Redis Configuration
|
||||||
host: yamanote.proxy.rlwy.net # Railway Redis服务器地址
|
host: maglev.proxy.rlwy.net # Railway Redis服务器地址
|
||||||
port: 34938 # Railway Redis服务器连接端口
|
port: 16780 # Railway Redis服务器连接端口
|
||||||
password: YbdhwguVUNowduNpDZjuSefZFhBXiOEP # Railway Redis服务器连接密码
|
password: beVfOKcZjMUCBiZIQnvSMivhpSeijpKP # Railway Redis服务器连接密码
|
||||||
username: default # Railway Redis用户名
|
username: default # Railway Redis用户名
|
||||||
database: 0 # Redis数据库索引(默认为0)
|
database: 0 # Redis数据库索引(默认为0)
|
||||||
timeout: 30000ms # 连接超时时间(毫秒)- 增加超时时间
|
timeout: 30000ms # 连接超时时间(毫秒)- 增加超时时间
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"production": {
|
"production": {
|
||||||
"chat_servers": [
|
"chat_servers": [
|
||||||
"ws://64.227.170.31:8000/toy/v1/"
|
"ws://139.59.7.72:8000/toy/v1/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"chat_servers": [
|
"chat_servers": [
|
||||||
"ws://64.227.170.31:8000/toy/v1/"
|
"ws://139.59.7.72:8000/toy/v1/"
|
||||||
],
|
],
|
||||||
"mac_addresss": [
|
"mac_addresss": [
|
||||||
]
|
]
|
||||||
|
|
|
||||||
BIN
main/xiaozhi-server/cache/cdn_audio/c203ba160fae43fdfeac6fa96235e389.mp3
vendored
Normal file
BIN
main/xiaozhi-server/cache/cdn_audio/c203ba160fae43fdfeac6fa96235e389.mp3
vendored
Normal file
Binary file not shown.
BIN
main/xiaozhi-server/cache/cdn_audio/f8710a9e72437540f8210c893d646cac.mp3
vendored
Normal file
BIN
main/xiaozhi-server/cache/cdn_audio/f8710a9e72437540f8210c893d646cac.mp3
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue