X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconstants.ts;h=4703e20f28acc50372afb205cb14c3a2cc3158dd;hb=4765348107ddd21cd2a0b86093859aa2e23ac0f1;hp=a53c226629be8af199ef2d1e6aa8ee6bbe8c955c;hpb=bd911b54b555b11df7e9849cf92d358bccfecf6e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index a53c22662..4703e20f2 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -1,11 +1,13 @@ import { RepeatOptions } from 'bullmq' -import { randomBytes } from 'crypto' +import { Encoding, randomBytes } from 'crypto' import { invert } from 'lodash' import { join } from 'path' import { randomInt, root } from '@shared/core-utils' import { AbuseState, JobType, + UserRegistrationState, + VideoChannelSyncState, VideoImportState, VideoPrivacy, VideoRateType, @@ -24,7 +26,7 @@ import { CONFIG, registerConfigChangedHandler } from './config' // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 725 +const LAST_MIGRATION_VERSION = 755 // --------------------------------------------------------------------------- @@ -64,6 +66,7 @@ const SORTABLE_COLUMNS = { JOBS: [ 'createdAt' ], VIDEO_CHANNELS: [ 'id', 'name', 'updatedAt', 'createdAt' ], VIDEO_IMPORTS: [ 'createdAt' ], + VIDEO_CHANNEL_SYNCS: [ 'externalChannelUrl', 'videoChannel', 'createdAt', 'lastSyncAt', 'state' ], VIDEO_COMMENT_THREADS: [ 'createdAt', 'totalReplies' ], VIDEO_COMMENTS: [ 'createdAt' ], @@ -76,6 +79,8 @@ const SORTABLE_COLUMNS = { ACCOUNT_FOLLOWERS: [ 'createdAt' ], CHANNEL_FOLLOWERS: [ 'createdAt' ], + USER_REGISTRATIONS: [ 'createdAt', 'state' ], + VIDEOS: [ 'name', 'duration', 'createdAt', 'publishedAt', 'originallyPublishedAt', 'views', 'likes', 'trending', 'hot', 'best' ], // Don't forget to update peertube-search-index with the same values @@ -99,11 +104,6 @@ const SORTABLE_COLUMNS = { VIDEO_REDUNDANCIES: [ 'name' ] } -const OAUTH_LIFETIME = { - ACCESS_TOKEN: 3600 * 24, // 1 day, for upload - REFRESH_TOKEN: 1209600 // 2 weeks -} - const ROUTE_CACHE_LIFETIME = { FEEDS: '15 minutes', ROBOTS: '2 hours', @@ -114,7 +114,8 @@ const ROUTE_CACHE_LIFETIME = { ACTIVITY_PUB: { VIDEOS: '1 second' // 1 second, cache concurrent requests after a broadcast for example }, - STATS: '4 hours' + STATS: '4 hours', + WELL_KNOWN: '1 day' } // --------------------------------------------------------------------------- @@ -156,6 +157,8 @@ const JOB_ATTEMPTS: { [id in JobType]: number } = { 'video-live-ending': 1, 'video-studio-edition': 1, 'manage-video-torrent': 1, + 'video-channel-import': 1, + 'after-video-channel-import': 1, 'move-to-object-storage': 3, 'notify': 1, 'federate-video': 1 @@ -164,7 +167,7 @@ const JOB_ATTEMPTS: { [id in JobType]: number } = { const JOB_CONCURRENCY: { [id in Exclude]: number } = { 'activitypub-http-broadcast': 1, 'activitypub-http-broadcast-parallel': 30, - 'activitypub-http-unicast': 10, + 'activitypub-http-unicast': 30, 'activitypub-http-fetcher': 3, 'activitypub-cleaner': 1, 'activitypub-follow': 1, @@ -178,6 +181,8 @@ const JOB_CONCURRENCY: { [id in Exclude