-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver_config.json
64 lines (58 loc) · 1.73 KB
/
server_config.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
"_comment": "这是配置文件的注释,解释每个字段的用途。",
"_comment_MQTT": "MQTT 配置,用于消息队列通信",
"MQTT_BROKER": "",
"MQTT_PORT": ,
"MQTT_USERNAME": "mqtt-server",
"MQTT_PASSWORD": "mqtt-server",
"MQTT_TOPIC": "/sensor_data/#",
"_comment_PICTURED_AND_SENSOR_ATABASE": "数据库配置",
"database": {
"host": "localhost",
"user": "root",
"password": "wz",
"database_sensor": "sensor_data",
"database_picture": "picture_data",
"charset": "utf8mb4"
},
"_comment_PICTURED_ATABASE": "MySQL 数据库配置,用于存储传感器数据",
"DB_CONFIG_PICTURE": {
"host": "localhost",
"user": "root",
"password": "wz",
"database": "picture_data",
"charset": "utf8mb4"
},
"_comment_SENSOR_DATABASE": "MySQL 数据库配置,用于存储传感器数据",
"COLLECT_MYSQL_CONFIG": {
"host": "localhost",
"user": "root",
"password": "wz",
"database": "sensor_data",
"charset": "utf8mb4"
},
"_comment_DEVICE_RANGE": "DEVICE_RANGE_START 和 DEVICE_RANGE_END 定义了设备 SN 的编号范围",
"SN_RANGE_START": 1,
"SN_RANGE_END": 10,
"_comment_GENERAL": "其他配置项",
"BASE_DIR": "pictures_data",
"COMPRESS_QUALITY": 85,
"BASE_URL": "",
"_comment_DIRECTORIES": "文件目录配置",
"directories": {
"pictures_data_dir": "./pictures_data",
"original_pattern": "^SN_(\\d+)_original$",
"thumbnail_suffix": "_thumbnail",
"image_pattern": "^(\\d+)_(\\d{14})\\.(?:jpg|bmp)$"
},
"_comment_THUMBNAIL": "缩略图生成配置",
"thumbnail": {
"size": [300, 300],
"quality": 85
},
"_comment_RETRY": "重试机制配置",
"retry": {
"delay_seconds": 3,
"max_retry_attempts": 30
}
}