Relax views federation
This commit is contained in:
parent
da8637bac9
commit
f53e1fcd99
|
@ -370,7 +370,7 @@ const CONSTRAINTS_FIELDS = {
|
|||
|
||||
const VIEW_LIFETIME = {
|
||||
VIEW: CONFIG.VIEWS.VIDEOS.IP_VIEW_EXPIRATION,
|
||||
VIEWER_COUNTER: 60000 * 1, // 1 minute
|
||||
VIEWER_COUNTER: 60000 * 2, // 2 minutes
|
||||
VIEWER_STATS: 60000 * 60 // 1 hour
|
||||
}
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ export class VideoViewerCounters {
|
|||
private async federateViewerIfNeeded (video: MVideo, viewer: Viewer) {
|
||||
// Federate the viewer if it's been a "long" time we did not
|
||||
const now = new Date().getTime()
|
||||
const federationLimit = now - (VIEW_LIFETIME.VIEWER_COUNTER / 2)
|
||||
const federationLimit = now - (VIEW_LIFETIME.VIEWER_COUNTER * 0.75)
|
||||
|
||||
if (viewer.lastFederation && viewer.lastFederation > federationLimit) return
|
||||
|
||||
|
|
Loading…
Reference in New Issue