X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconstants.ts;h=1dfc9fb27efb089adefede8a87e2627e47205234;hb=5752683ea518abfeaeb33adead3cb5541616e835;hp=3908bbf057b07457012ecbfcc6100bdafb5ac494;hpb=b1dbb9fefc870a90b25f5c0153589f45c9e75e3e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 3908bbf05..1dfc9fb27 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -6,6 +6,8 @@ import { randomInt, root } from '@shared/core-utils' import { AbuseState, JobType, + RunnerJobState, + UserRegistrationState, VideoChannelSyncState, VideoImportState, VideoPrivacy, @@ -25,7 +27,7 @@ import { CONFIG, registerConfigChangedHandler } from './config' // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 745 +const LAST_MIGRATION_VERSION = 770 // --------------------------------------------------------------------------- @@ -78,6 +80,12 @@ const SORTABLE_COLUMNS = { ACCOUNT_FOLLOWERS: [ 'createdAt' ], CHANNEL_FOLLOWERS: [ 'createdAt' ], + USER_REGISTRATIONS: [ 'createdAt', 'state' ], + + RUNNERS: [ 'createdAt' ], + RUNNER_REGISTRATION_TOKENS: [ 'createdAt' ], + RUNNER_JOBS: [ 'updatedAt', 'createdAt', 'priority', 'state', 'progress' ], + VIDEOS: [ 'name', 'duration', 'createdAt', 'publishedAt', 'originallyPublishedAt', 'views', 'likes', 'trending', 'hot', 'best' ], // Don't forget to update peertube-search-index with the same values @@ -101,11 +109,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', @@ -141,6 +144,8 @@ const REMOTE_SCHEME = { WS: 'wss' } +// --------------------------------------------------------------------------- + const JOB_ATTEMPTS: { [id in JobType]: number } = { 'activitypub-http-broadcast': 1, 'activitypub-http-broadcast-parallel': 1, @@ -162,6 +167,7 @@ const JOB_ATTEMPTS: { [id in JobType]: number } = { 'video-channel-import': 1, 'after-video-channel-import': 1, 'move-to-object-storage': 3, + 'transcoding-job-builder': 1, 'notify': 1, 'federate-video': 1 } @@ -169,7 +175,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, @@ -185,6 +191,7 @@ const JOB_CONCURRENCY: { [id in Exclude