exceed volumes and logging

This commit is contained in:
Nikita Bizyaev
2026-06-04 16:21:45 +03:00
parent e7b44539ae
commit 6dd619d621
2 changed files with 9 additions and 10 deletions

View File

@@ -3,11 +3,14 @@ import type { TopicHandler } from '../types.js'
export const TOPIC = 'data/edge5/video/v1' export const TOPIC = 'data/edge5/video/v1'
export const handleEdge5Video: TopicHandler = async (topic, payload) => { const BEACON_MS = 3000
console.log('edge5.video.received', { let lastBeacon = 0
topic,
bytes: payload.length, export const handleEdge5Video: TopicHandler = async (_topic, payload) => {
payload, const now = Date.now()
}) if (now - lastBeacon >= BEACON_MS) {
console.log(`edge5.video ↑ ${payload.length}B`)
lastBeacon = now
}
onEdgeChunk(payload) onEdgeChunk(payload)
} }

View File

@@ -21,7 +21,3 @@ services:
MQTT_URL: mqtt://mosquitto:1883 MQTT_URL: mqtt://mosquitto:1883
HTTP_PORT: "80" HTTP_PORT: "80"
WS_PORT: "9090" WS_PORT: "9090"
volumes:
- ./app:/app
# Linux node_modules из образа; без этого bind ./app затирает их win32-бинарниками с хоста
- /app/node_modules