X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconstants.ts;h=f4a2b358b4f048e1da746ae44fa9c920509c104c;hb=35f28e94c763370616d25d5820f4b9ef70cedca9;hp=00238f7a1cff9d888013e7a8e0e87bdb2ca86873;hpb=bee29df8a9ba3090be3daa8ff806dd9a26d7a5cf;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 00238f7a1..f4a2b358b 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -14,7 +14,7 @@ import { CONFIG, registerConfigChangedHandler } from './config' // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 460 +const LAST_MIGRATION_VERSION = 465 // --------------------------------------------------------------------------- @@ -46,7 +46,7 @@ const SORTABLE_COLUMNS = { VIDEO_ABUSES: [ 'id', 'createdAt', 'state' ], VIDEO_CHANNELS: [ 'id', 'name', 'updatedAt', 'createdAt' ], VIDEO_IMPORTS: [ 'createdAt' ], - VIDEO_COMMENT_THREADS: [ 'createdAt' ], + VIDEO_COMMENT_THREADS: [ 'createdAt', 'totalReplies' ], VIDEO_RATES: [ 'createdAt' ], BLACKLISTS: [ 'id', 'name', 'duration', 'views', 'likes', 'dislikes', 'uuid', 'createdAt' ], FOLLOWERS: [ 'createdAt', 'state', 'score' ], @@ -291,6 +291,9 @@ const CONSTRAINTS_FIELDS = { PLUGINS: { NAME: { min: 1, max: 214 }, // Length DESCRIPTION: { min: 1, max: 20000 } // Length + }, + COMMONS: { + URL: { min: 5, max: 2000 } // Length } } @@ -483,7 +486,7 @@ let PRIVATE_RSA_KEY_SIZE = 2048 // Password encryption const BCRYPT_SALT_SIZE = 10 -const USER_PASSWORD_RESET_LIFETIME = 60000 * 5 // 5 minutes +const USER_PASSWORD_RESET_LIFETIME = 60000 * 60 // 60 minutes const USER_EMAIL_VERIFY_LIFETIME = 60000 * 60 // 60 minutes @@ -569,7 +572,12 @@ const HLS_STREAMING_PLAYLIST_DIRECTORY = join(CONFIG.STORAGE.STREAMING_PLAYLISTS const HLS_REDUNDANCY_DIRECTORY = join(CONFIG.STORAGE.REDUNDANCY_DIR, 'hls') const MEMOIZE_TTL = { - OVERVIEWS_SAMPLE: 1000 * 3600 * 4 // 4 hours + OVERVIEWS_SAMPLE: 1000 * 3600 * 4, // 4 hours + INFO_HASH_EXISTS: 1000 * 3600 * 12 // 12 hours +} + +const MEMOIZE_LENGTH = { + INFO_HASH_EXISTS: 200 } const QUEUE_CONCURRENCY = { @@ -725,6 +733,7 @@ export { ACTIVITY_PUB_ACTOR_TYPES, THUMBNAILS_SIZE, VIDEO_CATEGORIES, + MEMOIZE_LENGTH, VIDEO_LANGUAGES, VIDEO_PRIVACIES, VIDEO_LICENCES,