feat: 在设备检测逻辑中添加失败计数器和错误类型判断,优化设备快照获取失败时的处理逻辑;在设备分配服务中引入设备优先前缀配置,增强设备分配的灵活性和负载均衡能力
This commit is contained in:
19
db_migration_device_priority_prefixes.sql
Normal file
19
db_migration_device_priority_prefixes.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- 添加设备优先前缀配置项
|
||||
-- 该配置用于指定设备选择时的前缀优先级,逗号分隔
|
||||
-- 例如:"xx,yy,zz" 表示优先选择 xx 开头的设备,其次 yy,最后 zz
|
||||
-- 同优先级内随机选择,实现负载均衡
|
||||
|
||||
INSERT INTO system_config (config_key, config_value, config_type, description, is_system, created_at, updated_at)
|
||||
VALUES (
|
||||
'device.priority_prefixes',
|
||||
'',
|
||||
'STRING',
|
||||
'设备选择优先前缀(逗号分隔),例如:xx,yy,zz。优先选择匹配前缀的设备,同优先级内随机。为空则全随机',
|
||||
1,
|
||||
NOW(3),
|
||||
NOW(3)
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
config_type = 'STRING',
|
||||
description = '设备选择优先前缀(逗号分隔),例如:xx,yy,zz。优先选择匹配前缀的设备,同优先级内随机。为空则全随机',
|
||||
updated_at = NOW(3);
|
||||
Reference in New Issue
Block a user