aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-11 15:38:53 +0200
committerChocobozzz <me@florianbigard.com>2019-04-11 15:38:53 +0200
commit8f0bc73d7d5f4c88cbc5588a0ece12b3855c8f98 (patch)
treee04f1da52f9377cf6ce820425c0de6e57ab57fc6 /server/initializers/constants.ts
parent76062d9f96e06a23a2efc8a727ea9c5394d21466 (diff)
downloadPeerTube-8f0bc73d7d5f4c88cbc5588a0ece12b3855c8f98.tar.gz
PeerTube-8f0bc73d7d5f4c88cbc5588a0ece12b3855c8f98.tar.zst
PeerTube-8f0bc73d7d5f4c88cbc5588a0ece12b3855c8f98.zip
Add ability to limit videos history size
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index a0609d7cd..f008cd291 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -158,12 +158,12 @@ const JOB_REQUEST_TIMEOUT = 3000 // 3 seconds
158const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 // 2 days 158const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 // 2 days
159const VIDEO_IMPORT_TIMEOUT = 1000 * 3600 // 1 hour 159const VIDEO_IMPORT_TIMEOUT = 1000 * 3600 // 1 hour
160 160
161// 1 hour 161const SCHEDULER_INTERVALS_MS = {
162let SCHEDULER_INTERVALS_MS = {
163 actorFollowScores: 60000 * 60, // 1 hour 162 actorFollowScores: 60000 * 60, // 1 hour
164 removeOldJobs: 60000 * 60, // 1 hour 163 removeOldJobs: 60000 * 60, // 1 hour
165 updateVideos: 60000, // 1 minute 164 updateVideos: 60000, // 1 minute
166 youtubeDLUpdate: 60000 * 60 * 24 // 1 day 165 youtubeDLUpdate: 60000 * 60 * 24, // 1 day
166 removeOldHistory: 60000 * 60 * 24 // 1 day
167} 167}
168 168
169// --------------------------------------------------------------------------- 169// ---------------------------------------------------------------------------
@@ -591,6 +591,7 @@ if (isTestInstance() === true) {
591 591
592 SCHEDULER_INTERVALS_MS.actorFollowScores = 1000 592 SCHEDULER_INTERVALS_MS.actorFollowScores = 1000
593 SCHEDULER_INTERVALS_MS.removeOldJobs = 10000 593 SCHEDULER_INTERVALS_MS.removeOldJobs = 10000
594 SCHEDULER_INTERVALS_MS.removeOldHistory = 5000
594 SCHEDULER_INTERVALS_MS.updateVideos = 5000 595 SCHEDULER_INTERVALS_MS.updateVideos = 5000
595 REPEAT_JOBS[ 'videos-views' ] = { every: 5000 } 596 REPEAT_JOBS[ 'videos-views' ] = { every: 5000 }
596 597
@@ -734,7 +735,7 @@ function buildVideosExtname () {
734} 735}
735 736
736function loadLanguages () { 737function loadLanguages () {
737 VIDEO_LANGUAGES = buildLanguages() 738 Object.assign(VIDEO_LANGUAGES, buildLanguages())
738} 739}
739 740
740function buildLanguages () { 741function buildLanguages () {