app/public/index.html
This commit is contained in:
@@ -10,5 +10,9 @@ COPY src ./src
|
|||||||
|
|
||||||
RUN npm run build && npm prune --omit=dev
|
RUN npm run build && npm prune --omit=dev
|
||||||
|
|
||||||
|
# app/public/index.html has content for video preview
|
||||||
|
# TODO move all static files (html, mappers) to a separate folder "assets"
|
||||||
|
COPY public ./public
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
CMD ["node", "dist/index.js"]
|
CMD ["node", "dist/index.js"]
|
||||||
|
|||||||
@@ -2,7 +2,14 @@ import { log } from '../helpers/log.js'
|
|||||||
import { onEdgeChunk } from '../stream/edge-chunk-relay.js'
|
import { onEdgeChunk } from '../stream/edge-chunk-relay.js'
|
||||||
import type { TopicHandler } from '../types.js'
|
import type { TopicHandler } from '../types.js'
|
||||||
|
|
||||||
|
const LOG_INTERVAL_MS = 10_000
|
||||||
|
let lastLog = 0
|
||||||
|
|
||||||
export const handleEdge5Video: TopicHandler = async (_topic, payload) => {
|
export const handleEdge5Video: TopicHandler = async (_topic, payload) => {
|
||||||
log(`edge5.video ↑ ${payload.length}B`);
|
const now = Date.now()
|
||||||
onEdgeChunk(payload);
|
if (now - lastLog >= LOG_INTERVAL_MS) {
|
||||||
|
log(`edge5.video ↑ ${payload.length}B`)
|
||||||
|
lastLog = now
|
||||||
|
}
|
||||||
|
onEdgeChunk(payload)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user