diff options
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index ae3d671bb..aa243859c 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -102,7 +102,8 @@ const JOB_ATTEMPTS: { [ id in JobType ]: number } = { | |||
102 | 'video-file': 1, | 102 | 'video-file': 1, |
103 | 'video-import': 1, | 103 | 'video-import': 1, |
104 | 'email': 5, | 104 | 'email': 5, |
105 | 'videos-views': 1 | 105 | 'videos-views': 1, |
106 | 'activitypub-refresher': 1 | ||
106 | } | 107 | } |
107 | const JOB_CONCURRENCY: { [ id in JobType ]: number } = { | 108 | const JOB_CONCURRENCY: { [ id in JobType ]: number } = { |
108 | 'activitypub-http-broadcast': 1, | 109 | 'activitypub-http-broadcast': 1, |
@@ -113,7 +114,8 @@ const JOB_CONCURRENCY: { [ id in JobType ]: number } = { | |||
113 | 'video-file': 1, | 114 | 'video-file': 1, |
114 | 'video-import': 1, | 115 | 'video-import': 1, |
115 | 'email': 5, | 116 | 'email': 5, |
116 | 'videos-views': 1 | 117 | 'videos-views': 1, |
118 | 'activitypub-refresher': 1 | ||
117 | } | 119 | } |
118 | const JOB_TTL: { [ id in JobType ]: number } = { | 120 | const JOB_TTL: { [ id in JobType ]: number } = { |
119 | 'activitypub-http-broadcast': 60000 * 10, // 10 minutes | 121 | 'activitypub-http-broadcast': 60000 * 10, // 10 minutes |
@@ -124,11 +126,12 @@ const JOB_TTL: { [ id in JobType ]: number } = { | |||
124 | 'video-file': 1000 * 3600 * 48, // 2 days, transcoding could be long | 126 | 'video-file': 1000 * 3600 * 48, // 2 days, transcoding could be long |
125 | 'video-import': 1000 * 3600 * 2, // hours | 127 | 'video-import': 1000 * 3600 * 2, // hours |
126 | 'email': 60000 * 10, // 10 minutes | 128 | 'email': 60000 * 10, // 10 minutes |
127 | 'videos-views': undefined // Unlimited | 129 | 'videos-views': undefined, // Unlimited |
130 | 'activitypub-refresher': 60000 * 10 // 10 minutes | ||
128 | } | 131 | } |
129 | const REPEAT_JOBS: { [ id: string ]: EveryRepeatOptions | CronRepeatOptions } = { | 132 | const REPEAT_JOBS: { [ id: string ]: EveryRepeatOptions | CronRepeatOptions } = { |
130 | 'videos-views': { | 133 | 'videos-views': { |
131 | cron: '1 * * * *' // At 1 minutes past the hour | 134 | cron: '1 * * * *' // At 1 minute past the hour |
132 | } | 135 | } |
133 | } | 136 | } |
134 | 137 | ||
@@ -543,7 +546,7 @@ const HTTP_SIGNATURE = { | |||
543 | 546 | ||
544 | // --------------------------------------------------------------------------- | 547 | // --------------------------------------------------------------------------- |
545 | 548 | ||
546 | const PRIVATE_RSA_KEY_SIZE = 2048 | 549 | let PRIVATE_RSA_KEY_SIZE = 2048 |
547 | 550 | ||
548 | // Password encryption | 551 | // Password encryption |
549 | const BCRYPT_SALT_SIZE = 10 | 552 | const BCRYPT_SALT_SIZE = 10 |
@@ -647,6 +650,8 @@ const TRACKER_RATE_LIMITS = { | |||
647 | 650 | ||
648 | // Special constants for a test instance | 651 | // Special constants for a test instance |
649 | if (isTestInstance() === true) { | 652 | if (isTestInstance() === true) { |
653 | PRIVATE_RSA_KEY_SIZE = 1024 | ||
654 | |||
650 | ACTOR_FOLLOW_SCORE.BASE = 20 | 655 | ACTOR_FOLLOW_SCORE.BASE = 20 |
651 | 656 | ||
652 | REMOTE_SCHEME.HTTP = 'http' | 657 | REMOTE_SCHEME.HTTP = 'http' |