aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos/video-live.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-27 16:19:25 +0200
committerChocobozzz <me@florianbigard.com>2022-07-27 16:19:25 +0200
commitadc94cf09c86112051f72055852efcc977e4a04a (patch)
treeae6f25824c1e66004fa69aa9f685642d8d7ad8b4 /server/middlewares/validators/videos/video-live.ts
parent50cc1ee48aacb6e7d6513c0f108492a589b515ea (diff)
downloadPeerTube-adc94cf09c86112051f72055852efcc977e4a04a.tar.gz
PeerTube-adc94cf09c86112051f72055852efcc977e4a04a.tar.zst
PeerTube-adc94cf09c86112051f72055852efcc977e4a04a.zip
Add live and viewers otel metrics
Diffstat (limited to 'server/middlewares/validators/videos/video-live.ts')
-rw-r--r--server/middlewares/validators/videos/video-live.ts2
1 files changed, 1 insertions, 1 deletions
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([
119 if (!await doesVideoChannelOfAccountExist(body.channelId, user, res)) return cleanUpReqFiles(req) 119 if (!await doesVideoChannelOfAccountExist(body.channelId, user, res)) return cleanUpReqFiles(req)
120 120
121 if (CONFIG.LIVE.MAX_INSTANCE_LIVES !== -1) { 121 if (CONFIG.LIVE.MAX_INSTANCE_LIVES !== -1) {
122 const totalInstanceLives = await VideoModel.countLocalLives() 122 const totalInstanceLives = await VideoModel.countLives({ remote: false, mode: 'not-ended' })
123 123
124 if (totalInstanceLives >= CONFIG.LIVE.MAX_INSTANCE_LIVES) { 124 if (totalInstanceLives >= CONFIG.LIVE.MAX_INSTANCE_LIVES) {
125 cleanUpReqFiles(req) 125 cleanUpReqFiles(req)