aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts20
1 files changed, 17 insertions, 3 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 03828f54f..e7b1656e2 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -65,13 +65,15 @@ const JOB_ATTEMPTS: { [ id in JobType ]: number } = {
65 'activitypub-http-broadcast': 5, 65 'activitypub-http-broadcast': 5,
66 'activitypub-http-unicast': 5, 66 'activitypub-http-unicast': 5,
67 'activitypub-http-fetcher': 5, 67 'activitypub-http-fetcher': 5,
68 'video-file': 1 68 'video-file': 1,
69 'email': 5
69} 70}
70const JOB_CONCURRENCY: { [ id in JobType ]: number } = { 71const JOB_CONCURRENCY: { [ id in JobType ]: number } = {
71 'activitypub-http-broadcast': 1, 72 'activitypub-http-broadcast': 1,
72 'activitypub-http-unicast': 5, 73 'activitypub-http-unicast': 5,
73 'activitypub-http-fetcher': 1, 74 'activitypub-http-fetcher': 1,
74 'video-file': 1 75 'video-file': 1,
76 'email': 5
75} 77}
76// 2 days 78// 2 days
77const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 79const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2
@@ -95,9 +97,18 @@ const CONFIG = {
95 }, 97 },
96 REDIS: { 98 REDIS: {
97 HOSTNAME: config.get<string>('redis.hostname'), 99 HOSTNAME: config.get<string>('redis.hostname'),
98 PORT: config.get<string>('redis.port'), 100 PORT: config.get<number>('redis.port'),
99 AUTH: config.get<string>('redis.auth') 101 AUTH: config.get<string>('redis.auth')
100 }, 102 },
103 SMTP: {
104 HOSTNAME: config.get<string>('smtp.hostname'),
105 PORT: config.get<number>('smtp.port'),
106 USERNAME: config.get<string>('smtp.username'),
107 PASSWORD: config.get<string>('smtp.password'),
108 TLS: config.get<boolean>('smtp.tls'),
109 CA_FILE: config.get<string>('smtp.ca_file'),
110 FROM_ADDRESS: config.get<string>('smtp.from_address')
111 },
101 STORAGE: { 112 STORAGE: {
102 AVATARS_DIR: buildPath(config.get<string>('storage.avatars')), 113 AVATARS_DIR: buildPath(config.get<string>('storage.avatars')),
103 LOG_DIR: buildPath(config.get<string>('storage.logs')), 114 LOG_DIR: buildPath(config.get<string>('storage.logs')),
@@ -311,6 +322,8 @@ const PRIVATE_RSA_KEY_SIZE = 2048
311// Password encryption 322// Password encryption
312const BCRYPT_SALT_SIZE = 10 323const BCRYPT_SALT_SIZE = 10
313 324
325const USER_PASSWORD_RESET_LIFETIME = 60000 * 5 // 5 minutes
326
314// --------------------------------------------------------------------------- 327// ---------------------------------------------------------------------------
315 328
316// Express static paths (router) 329// Express static paths (router)
@@ -408,6 +421,7 @@ export {
408 VIDEO_LICENCES, 421 VIDEO_LICENCES,
409 VIDEO_RATE_TYPES, 422 VIDEO_RATE_TYPES,
410 VIDEO_MIMETYPE_EXT, 423 VIDEO_MIMETYPE_EXT,
424 USER_PASSWORD_RESET_LIFETIME,
411 AVATAR_MIMETYPE_EXT, 425 AVATAR_MIMETYPE_EXT,
412 SCHEDULER_INTERVAL, 426 SCHEDULER_INTERVAL,
413 JOB_COMPLETED_LIFETIME 427 JOB_COMPLETED_LIFETIME