// ---------------------------------------------------------------------------
-const LAST_MIGRATION_VERSION = 210
+const LAST_MIGRATION_VERSION = 215
// ---------------------------------------------------------------------------
JOBS: [ 'createdAt' ],
VIDEO_ABUSES: [ 'id', 'createdAt' ],
VIDEO_CHANNELS: [ 'id', 'name', 'updatedAt', 'createdAt' ],
- VIDEOS: [ 'name', 'duration', 'createdAt', 'views', 'likes' ],
+ VIDEOS: [ 'name', 'duration', 'createdAt', 'publishedAt', 'views', 'likes' ],
VIDEO_COMMENT_THREADS: [ 'createdAt' ],
BLACKLISTS: [ 'id', 'name', 'duration', 'views', 'likes', 'dislikes', 'uuid', 'createdAt' ],
FOLLOWERS: [ 'createdAt' ],
REFRESH_TOKEN: 1209600 // 2 weeks
}
+const ROUTE_CACHE_LIFETIME = {
+ FEEDS: 1000 * 60 * 15, // 15 minutes
+ ACTIVITY_PUB: {
+ VIDEOS: 1000 // 1 second, cache concurrent requests after a broadcast for example
+ }
+}
+
// ---------------------------------------------------------------------------
// Number of points we add/remove after a successful/bad request
'video-file': 1,
'email': 5
}
-const BROADCAST_CONCURRENCY = 5 // How many requests in parallel we do in activitypub-http-broadcast job
-// 2 days
-const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2
+const BROADCAST_CONCURRENCY = 10 // How many requests in parallel we do in activitypub-http-broadcast job
+const JOB_REQUEST_TIMEOUT = 3000 // 3 seconds
+const JOB_REQUEST_TTL = 60000 * 10 // 10 minutes
+const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 // 2 days
// 1 hour
let SCHEDULER_INTERVAL = 60000 * 60
CUSTOMIZATIONS: {
get JAVASCRIPT () { return config.get<string>('instance.customizations.javascript') },
get CSS () { return config.get<string>('instance.customizations.css') }
+ },
+ get ROBOTS () { return config.get<string>('instance.robots') }
+ },
+ SERVICES: {
+ TWITTER: {
+ get USERNAME () { return config.get<string>('services.twitter.username') },
+ get WHITELISTED () { return config.get<boolean>('services.twitter.whitelisted') }
}
}
}
},
VIDEO_CHANNELS: {
NAME: { min: 3, max: 120 }, // Length
- DESCRIPTION: { min: 3, max: 250 }, // Length
- SUPPORT: { min: 3, max: 300 }, // Length
+ DESCRIPTION: { min: 3, max: 500 }, // Length
+ SUPPORT: { min: 3, max: 500 }, // Length
URL: { min: 3, max: 2000 } // Length
},
VIDEOS: {
LANGUAGE: { min: 1, max: 10 }, // Length
TRUNCATED_DESCRIPTION: { min: 3, max: 250 }, // Length
DESCRIPTION: { min: 3, max: 10000 }, // Length
- SUPPORT: { min: 3, max: 300 }, // Length
+ SUPPORT: { min: 3, max: 500 }, // Length
IMAGE: {
EXTNAME: [ '.jpg', '.jpeg' ],
FILE_SIZE: {
// ---------------------------------------------------------------------------
const FEEDS = {
- COUNT: 20,
- CACHE_LIFETIME: 1000 * 60 * 15 // 15 minutes
+ COUNT: 20
}
// ---------------------------------------------------------------------------
FOLLOW_STATES,
SERVER_ACTOR_NAME,
PRIVATE_RSA_KEY_SIZE,
+ ROUTE_CACHE_LIFETIME,
SORTABLE_COLUMNS,
FEEDS,
NSFW_POLICY_TYPES,
VIDEO_RATE_TYPES,
VIDEO_MIMETYPE_EXT,
VIDEO_TRANSCODING_FPS,
+ JOB_REQUEST_TIMEOUT,
+ JOB_REQUEST_TTL,
USER_PASSWORD_RESET_LIFETIME,
IMAGE_MIMETYPE_EXT,
SCHEDULER_INTERVAL,