X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconstants.ts;h=0dab524d9cef3d4a07408f10d73e17927b3c1e37;hb=b65f5367baf799b425be0bcfb9220922751bb6eb;hp=a53c226629be8af199ef2d1e6aa8ee6bbe8c955c;hpb=bd911b54b555b11df7e9849cf92d358bccfecf6e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index a53c22662..0dab524d9 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -1,11 +1,12 @@ 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, + VideoChannelSyncState, VideoImportState, VideoPrivacy, VideoRateType, @@ -24,7 +25,7 @@ import { CONFIG, registerConfigChangedHandler } from './config' // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 725 +const LAST_MIGRATION_VERSION = 745 // --------------------------------------------------------------------------- @@ -64,6 +65,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' ], @@ -99,11 +101,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 +111,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 +154,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 +164,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 +178,8 @@ const JOB_CONCURRENCY: { [id in Exclude