Refactor sensor data publishing and health check server configuration. Updated MQTT topic structure for individual data points, improved error handling, and added garbage collection to manage memory. Enhanced logging for health check server accessibility and sensor status updates.
This commit is contained in:
@ -85,6 +85,8 @@ job "poe-sensor" {
|
||||
env {
|
||||
LOG_LEVEL = "INFO"
|
||||
PYTHONUNBUFFERED = "1"
|
||||
PYTHONDONTWRITEBYTECODE = "1" # Prevent .pyc files to save memory
|
||||
PYTHONMALLOC = "malloc" # Use system malloc for better memory management
|
||||
TZ = "Asia/Ho_Chi_Minh"
|
||||
# MQTT configuration (can be overridden by config.py)
|
||||
MQTT_BROKER = "mqtt.service.mesh"
|
||||
@ -96,7 +98,7 @@ job "poe-sensor" {
|
||||
# Resource allocation
|
||||
resources {
|
||||
cpu = 256
|
||||
memory = 256
|
||||
memory = 512
|
||||
}
|
||||
|
||||
# Logs configuration
|
||||
|
Reference in New Issue
Block a user