From aa2ce188d102ab38452df316d06286040b5d9075 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Jun 2022 14:34:37 +0200 Subject: Optimize view endpoint --- server/initializers/constants.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/initializers') diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 75ccbc458..52007d212 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -734,12 +734,14 @@ const VIDEO_LIVE = { const MEMOIZE_TTL = { OVERVIEWS_SAMPLE: 1000 * 3600 * 4, // 4 hours INFO_HASH_EXISTS: 1000 * 3600 * 12, // 12 hours + VIDEO_DURATION: 1000 * 10, // 10 seconds LIVE_ABLE_TO_UPLOAD: 1000 * 60, // 1 minute LIVE_CHECK_SOCKET_HEALTH: 1000 * 60 // 1 minute } const MEMOIZE_LENGTH = { - INFO_HASH_EXISTS: 200 + INFO_HASH_EXISTS: 200, + VIDEO_DURATION: 200 } const QUEUE_CONCURRENCY = { @@ -812,7 +814,7 @@ const STATS_TIMESERIE = { // --------------------------------------------------------------------------- // Special constants for a test instance -if (isTestInstance() === true) { +if (isTestInstance() === true && process.env.PRODUCTION_CONSTANTS !== 'true') { PRIVATE_RSA_KEY_SIZE = 1024 ACTOR_FOLLOW_SCORE.BASE = 20 -- cgit v1.2.3