diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-09 10:11:20 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-11-09 15:00:31 +0100 |
commit | 51353d9a035fb6b81f903a8b5f391292841649fd (patch) | |
tree | 75acb6eea5e043bf2e15a6a5a92e9a3c5967b156 /shared/extra-utils | |
parent | 221ee1adc916684d4881d2a9c4c01954dcde986e (diff) | |
download | PeerTube-51353d9a035fb6b81f903a8b5f391292841649fd.tar.gz PeerTube-51353d9a035fb6b81f903a8b5f391292841649fd.tar.zst PeerTube-51353d9a035fb6b81f903a8b5f391292841649fd.zip |
Refactor video views
Introduce viewers attribute for live videos
Count views for live videos
Reduce delay to see the viewer update for lives
Add ability to configure video views buffer interval and view ip
expiration
Diffstat (limited to 'shared/extra-utils')
-rw-r--r-- | shared/extra-utils/server/jobs.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts index 79b8c3183..afaaa5cd6 100644 --- a/shared/extra-utils/server/jobs.ts +++ b/shared/extra-utils/server/jobs.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | import { JobState } from '../../models' | 2 | import { JobState, JobType } from '../../models' |
3 | import { wait } from '../miscs' | 3 | import { wait } from '../miscs' |
4 | import { PeerTubeServer } from './server' | 4 | import { PeerTubeServer } from './server' |
5 | 5 | ||
@@ -16,7 +16,7 @@ async function waitJobs (serversArg: PeerTubeServer[] | PeerTubeServer, skipDela | |||
16 | const states: JobState[] = [ 'waiting', 'active' ] | 16 | const states: JobState[] = [ 'waiting', 'active' ] |
17 | if (!skipDelayed) states.push('delayed') | 17 | if (!skipDelayed) states.push('delayed') |
18 | 18 | ||
19 | const repeatableJobs = [ 'videos-views', 'activitypub-cleaner' ] | 19 | const repeatableJobs: JobType[] = [ 'videos-views-stats', 'activitypub-cleaner' ] |
20 | let pendingRequests: boolean | 20 | let pendingRequests: boolean |
21 | 21 | ||
22 | function tasksBuilder () { | 22 | function tasksBuilder () { |