exceed volumes and logging
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user