X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconstants.ts;h=c2289ef360cb19b394437b8c913e1c27357f43ab;hb=0582b4f972a72c2297676faf1e574f817a5712f9;hp=5329d75f80a9832ff4cbfb769574ae9a826f48c8;hpb=64324ac646b0938e35cd88771492623b640bd0d8;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 5329d75f8..c2289ef36 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -1,4 +1,4 @@ -import { CronRepeatOptions, EveryRepeatOptions } from 'bull' +import { RepeatOptions } from 'bullmq' import { randomBytes } from 'crypto' import { invert } from 'lodash' import { join } from 'path' @@ -6,6 +6,7 @@ import { randomInt, root } from '@shared/core-utils' import { AbuseState, JobType, + VideoChannelSyncState, VideoImportState, VideoPrivacy, VideoRateType, @@ -19,12 +20,12 @@ import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model' import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model' // Do not use barrels, remain constants as independent as possible -import { isTestInstance, parseDurationToMs, sanitizeHost, sanitizeUrl } from '../helpers/core-utils' +import { isTestInstance, isTestOrDevInstance, parseDurationToMs, sanitizeHost, sanitizeUrl } from '../helpers/core-utils' import { CONFIG, registerConfigChangedHandler } from './config' // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 715 +const LAST_MIGRATION_VERSION = 735 // --------------------------------------------------------------------------- @@ -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' ], @@ -129,7 +131,8 @@ const ACTOR_FOLLOW_SCORE = { const FOLLOW_STATES: { [ id: string ]: FollowState } = { PENDING: 'pending', - ACCEPTED: 'accepted' + ACCEPTED: 'accepted', + REJECTED: 'rejected' } const REMOTE_SCHEME = { @@ -155,7 +158,11 @@ const JOB_ATTEMPTS: { [id in JobType]: number } = { 'video-live-ending': 1, 'video-studio-edition': 1, 'manage-video-torrent': 1, - 'move-to-object-storage': 3 + 'video-channel-import': 1, + 'after-video-channel-import': 1, + 'move-to-object-storage': 3, + 'notify': 1, + 'federate-video': 1 } // Excluded keys are jobs that can be configured by admins const JOB_CONCURRENCY: { [id in Exclude]: number } = { @@ -174,7 +181,11 @@ const JOB_CONCURRENCY: { [id in Exclude