From adc94cf09c86112051f72055852efcc977e4a04a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 27 Jul 2022 16:19:25 +0200 Subject: Add live and viewers otel metrics --- server/middlewares/validators/videos/video-live.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/middlewares/validators/videos/video-live.ts') diff --git a/server/middlewares/validators/videos/video-live.ts b/server/middlewares/validators/videos/video-live.ts index 59638d5e0..777b57e9a 100644 --- a/server/middlewares/validators/videos/video-live.ts +++ b/server/middlewares/validators/videos/video-live.ts @@ -119,7 +119,7 @@ const videoLiveAddValidator = getCommonVideoEditAttributes().concat([ if (!await doesVideoChannelOfAccountExist(body.channelId, user, res)) return cleanUpReqFiles(req) if (CONFIG.LIVE.MAX_INSTANCE_LIVES !== -1) { - const totalInstanceLives = await VideoModel.countLocalLives() + const totalInstanceLives = await VideoModel.countLives({ remote: false, mode: 'not-ended' }) if (totalInstanceLives >= CONFIG.LIVE.MAX_INSTANCE_LIVES) { cleanUpReqFiles(req) -- cgit v1.2.3