aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-09 17:51:58 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:51 +0100
commite4f97babf701481b55cc10fb3448feab5f97c867 (patch)
treeaf37402a594dc5ff09f71ecb0687e8cfe4cdb471 /server/initializers/constants.ts
parent343ad675f2a26c15b86150a9a3552e619d5d44f4 (diff)
downloadPeerTube-e4f97babf701481b55cc10fb3448feab5f97c867.tar.gz
PeerTube-e4f97babf701481b55cc10fb3448feab5f97c867.tar.zst
PeerTube-e4f97babf701481b55cc10fb3448feab5f97c867.zip
Begin activitypub
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts31
1 files changed, 20 insertions, 11 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index d349abaf0..cb838cf16 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -10,7 +10,8 @@ import {
10 RequestVideoEventType, 10 RequestVideoEventType,
11 RequestVideoQaduType, 11 RequestVideoQaduType,
12 RemoteVideoRequestType, 12 RemoteVideoRequestType,
13 JobState 13 JobState,
14 JobCategory
14} from '../../shared/models' 15} from '../../shared/models'
15import { VideoPrivacy } from '../../shared/models/videos/video-privacy.enum' 16import { VideoPrivacy } from '../../shared/models/videos/video-privacy.enum'
16 17
@@ -60,7 +61,6 @@ const CONFIG = {
60 PASSWORD: config.get<string>('database.password') 61 PASSWORD: config.get<string>('database.password')
61 }, 62 },
62 STORAGE: { 63 STORAGE: {
63 CERT_DIR: join(root(), config.get<string>('storage.certs')),
64 LOG_DIR: join(root(), config.get<string>('storage.logs')), 64 LOG_DIR: join(root(), config.get<string>('storage.logs')),
65 VIDEOS_DIR: join(root(), config.get<string>('storage.videos')), 65 VIDEOS_DIR: join(root(), config.get<string>('storage.videos')),
66 THUMBNAILS_DIR: join(root(), config.get<string>('storage.thumbnails')), 66 THUMBNAILS_DIR: join(root(), config.get<string>('storage.thumbnails')),
@@ -211,6 +211,10 @@ const FRIEND_SCORE = {
211 MAX: 1000 211 MAX: 1000
212} 212}
213 213
214const ACTIVITY_PUB = {
215 COLLECTION_ITEMS_PER_PAGE: 10
216}
217
214// --------------------------------------------------------------------------- 218// ---------------------------------------------------------------------------
215 219
216// Number of points we add/remove from a friend after a successful/bad request 220// Number of points we add/remove from a friend after a successful/bad request
@@ -288,17 +292,23 @@ const JOB_STATES: { [ id: string ]: JobState } = {
288 ERROR: 'error', 292 ERROR: 'error',
289 SUCCESS: 'success' 293 SUCCESS: 'success'
290} 294}
295const JOB_CATEGORIES: { [ id: string ]: JobCategory } = {
296 TRANSCODING: 'transcoding',
297 HTTP_REQUEST: 'http-request'
298}
291// How many maximum jobs we fetch from the database per cycle 299// How many maximum jobs we fetch from the database per cycle
292const JOBS_FETCH_LIMIT_PER_CYCLE = 10 300const JOBS_FETCH_LIMIT_PER_CYCLE = {
301 transcoding: 10,
302 httpRequest: 20
303}
293// 1 minutes 304// 1 minutes
294let JOBS_FETCHING_INTERVAL = 60000 305let JOBS_FETCHING_INTERVAL = 60000
295 306
296// --------------------------------------------------------------------------- 307// ---------------------------------------------------------------------------
297 308
298const PRIVATE_CERT_NAME = 'peertube.key.pem' 309// const SIGNATURE_ALGORITHM = 'RSA-SHA256'
299const PUBLIC_CERT_NAME = 'peertube.pub' 310// const SIGNATURE_ENCODING = 'hex'
300const SIGNATURE_ALGORITHM = 'RSA-SHA256' 311const PRIVATE_RSA_KEY_SIZE = 2048
301const SIGNATURE_ENCODING = 'hex'
302 312
303// Password encryption 313// Password encryption
304const BCRYPT_SALT_SIZE = 10 314const BCRYPT_SALT_SIZE = 10
@@ -368,14 +378,13 @@ export {
368 JOB_STATES, 378 JOB_STATES,
369 JOBS_FETCH_LIMIT_PER_CYCLE, 379 JOBS_FETCH_LIMIT_PER_CYCLE,
370 JOBS_FETCHING_INTERVAL, 380 JOBS_FETCHING_INTERVAL,
381 JOB_CATEGORIES,
371 LAST_MIGRATION_VERSION, 382 LAST_MIGRATION_VERSION,
372 OAUTH_LIFETIME, 383 OAUTH_LIFETIME,
373 OPENGRAPH_AND_OEMBED_COMMENT, 384 OPENGRAPH_AND_OEMBED_COMMENT,
374 PAGINATION_COUNT_DEFAULT, 385 PAGINATION_COUNT_DEFAULT,
375 PODS_SCORE, 386 PODS_SCORE,
376 PREVIEWS_SIZE, 387 PREVIEWS_SIZE,
377 PRIVATE_CERT_NAME,
378 PUBLIC_CERT_NAME,
379 REMOTE_SCHEME, 388 REMOTE_SCHEME,
380 REQUEST_ENDPOINT_ACTIONS, 389 REQUEST_ENDPOINT_ACTIONS,
381 REQUEST_ENDPOINTS, 390 REQUEST_ENDPOINTS,
@@ -393,11 +402,11 @@ export {
393 REQUESTS_VIDEO_QADU_LIMIT_PODS, 402 REQUESTS_VIDEO_QADU_LIMIT_PODS,
394 RETRY_REQUESTS, 403 RETRY_REQUESTS,
395 SEARCHABLE_COLUMNS, 404 SEARCHABLE_COLUMNS,
396 SIGNATURE_ALGORITHM, 405 PRIVATE_RSA_KEY_SIZE,
397 SIGNATURE_ENCODING,
398 SORTABLE_COLUMNS, 406 SORTABLE_COLUMNS,
399 STATIC_MAX_AGE, 407 STATIC_MAX_AGE,
400 STATIC_PATHS, 408 STATIC_PATHS,
409 ACTIVITY_PUB,
401 THUMBNAILS_SIZE, 410 THUMBNAILS_SIZE,
402 VIDEO_CATEGORIES, 411 VIDEO_CATEGORIES,
403 VIDEO_LANGUAGES, 412 VIDEO_LANGUAGES,