// ---------------------------------------------------------------------------
-const LAST_MIGRATION_VERSION = 345
+const LAST_MIGRATION_VERSION = 360
// ---------------------------------------------------------------------------
VIDEO_CHANNELS: [ 'id', 'name', 'updatedAt', 'createdAt' ],
VIDEO_IMPORTS: [ 'createdAt' ],
VIDEO_COMMENT_THREADS: [ 'createdAt' ],
+ VIDEO_RATES: [ 'createdAt' ],
BLACKLISTS: [ 'id', 'name', 'duration', 'views', 'likes', 'dislikes', 'uuid', 'createdAt' ],
FOLLOWERS: [ 'createdAt' ],
FOLLOWING: [ 'createdAt' ],
WS: 'wss'
}
-const JOB_ATTEMPTS: { [ id in JobType ]: number } = {
+// TODO: remove 'video-file'
+const JOB_ATTEMPTS: { [ id in (JobType | 'video-file') ]: number } = {
'activitypub-http-broadcast': 5,
'activitypub-http-unicast': 5,
'activitypub-http-fetcher': 5,
'activitypub-follow': 5,
'video-file-import': 1,
+ 'video-transcoding': 1,
'video-file': 1,
'video-import': 1,
'email': 5,
'videos-views': 1,
'activitypub-refresher': 1
}
-const JOB_CONCURRENCY: { [ id in JobType ]: number } = {
+const JOB_CONCURRENCY: { [ id in (JobType | 'video-file') ]: number } = {
'activitypub-http-broadcast': 1,
'activitypub-http-unicast': 5,
'activitypub-http-fetcher': 1,
'activitypub-follow': 3,
'video-file-import': 1,
+ 'video-transcoding': 1,
'video-file': 1,
'video-import': 1,
'email': 5,
'videos-views': 1,
'activitypub-refresher': 1
}
-const JOB_TTL: { [ id in JobType ]: number } = {
+const JOB_TTL: { [ id in (JobType | 'video-file') ]: number } = {
'activitypub-http-broadcast': 60000 * 10, // 10 minutes
'activitypub-http-unicast': 60000 * 10, // 10 minutes
'activitypub-http-fetcher': 60000 * 10, // 10 minutes
'activitypub-follow': 60000 * 10, // 10 minutes
'video-file-import': 1000 * 3600, // 1 hour
+ 'video-transcoding': 1000 * 3600 * 48, // 2 days, transcoding could be long
'video-file': 1000 * 3600 * 48, // 2 days, transcoding could be long
'video-import': 1000 * 3600 * 2, // hours
'email': 60000 * 10, // 10 minutes
}
}
},
+ AUTO_BLACKLIST: {
+ VIDEOS: {
+ OF_USERS: {
+ get ENABLED () { return config.get<boolean>('auto_blacklist.videos.of_users.enabled') }
+ }
+ }
+ },
CACHE: {
PREVIEWS: {
get SIZE () { return config.get<number>('cache.previews.size') }
get USERNAME () { return config.get<string>('services.twitter.username') },
get WHITELISTED () { return config.get<boolean>('services.twitter.whitelisted') }
}
+ },
+ FOLLOWERS: {
+ INSTANCE: {
+ get ENABLED () { return config.get<boolean>('followers.instance.enabled') },
+ get MANUAL_APPROVAL () { return config.get<boolean>('followers.instance.manual_approval') }
+ }
}
}
ANNOUNCES_PER_IP: 30 // maximum announces for all our torrents in the interval
}
+const P2P_MEDIA_LOADER_PEER_VERSION = 2
+
// ---------------------------------------------------------------------------
// Special constants for a test instance
export {
API_VERSION,
HLS_REDUNDANCY_DIRECTORY,
+ P2P_MEDIA_LOADER_PEER_VERSION,
AVATARS_SIZE,
ACCEPT_HEADERS,
BCRYPT_SALT_SIZE,