X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconstants.ts;h=a3e5f5dd20e4737de9a6a18678b05c0b6c42f511;hb=edb4ffc7e0b13659d7c73b120f2c87b27e4c26a1;hp=de426c16e0ad35d731d8ac8d7f3c3945d2e17f1c;hpb=4a08f6692780fa5147d85126af3089fc7891e436;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index de426c16e..a3e5f5dd2 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -3,7 +3,7 @@ import { dirname, join } from 'path' import { JobType, VideoRateType, VideoState, VideosRedundancy } from '../../shared/models' import { ActivityPubActorType } from '../../shared/models/activitypub' import { FollowState } from '../../shared/models/actors' -import { VideoAbuseState, VideoImportState, VideoPrivacy } from '../../shared/models/videos' +import { VideoAbuseState, VideoImportState, VideoPrivacy, VideoTranscodingFPS } from '../../shared/models/videos' // Do not use barrels, remain constants as independent as possible import { buildPath, isTestInstance, parseDuration, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils' import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' @@ -16,7 +16,7 @@ let config: IConfig = require('config') // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 270 +const LAST_MIGRATION_VERSION = 275 // --------------------------------------------------------------------------- @@ -119,7 +119,7 @@ const JOB_TTL: { [ id in JobType ]: number } = { 'activitypub-follow': 60000 * 10, // 10 minutes 'video-file-import': 1000 * 3600, // 1 hour 'video-file': 1000 * 3600 * 48, // 2 days, transcoding could be long - 'video-import': 1000 * 3600, // 1 hour + 'video-import': 1000 * 3600 * 2, // hours 'email': 60000 * 10, // 10 minutes 'videos-views': undefined // Unlimited } @@ -133,6 +133,7 @@ const BROADCAST_CONCURRENCY = 10 // How many requests in parallel we do in activ const CRAWL_REQUEST_CONCURRENCY = 1 // How many requests in parallel to fetch remote data (likes, shares...) const JOB_REQUEST_TIMEOUT = 3000 // 3 seconds const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 // 2 days +const VIDEO_IMPORT_TIMEOUT = 1000 * 3600 // 1 hour // 1 hour let SCHEDULER_INTERVALS_MS = { @@ -392,7 +393,7 @@ const RATES_LIMIT = { } let VIDEO_VIEW_LIFETIME = 60000 * 60 // 1 hour -const VIDEO_TRANSCODING_FPS = { +const VIDEO_TRANSCODING_FPS: VideoTranscodingFPS = { MIN: 10, AVERAGE: 30, MAX: 60, @@ -700,6 +701,7 @@ export { TORRENT_MIMETYPE_EXT, STATIC_MAX_AGE, STATIC_PATHS, + VIDEO_IMPORT_TIMEOUT, ACTIVITY_PUB, ACTIVITY_PUB_ACTOR_TYPES, THUMBNAILS_SIZE,