]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/constants.ts
Merge branch 'develop' of framagit.org:chocobozzz/PeerTube into develop
[github/Chocobozzz/PeerTube.git] / server / initializers / constants.ts
index 2622b2c71a2561b735a31dbbcc25f4914f85cba2..5ee13389d1e182d2e464ba540ed1b4b3d2392c29 100644 (file)
@@ -65,6 +65,7 @@ const JOB_ATTEMPTS: { [ id in JobType ]: number } = {
   'activitypub-http-broadcast': 5,
   'activitypub-http-unicast': 5,
   'activitypub-http-fetcher': 5,
+  'activitypub-follow': 5,
   'video-file': 1,
   'email': 5
 }
@@ -72,9 +73,11 @@ const JOB_CONCURRENCY: { [ id in JobType ]: number } = {
   'activitypub-http-broadcast': 1,
   'activitypub-http-unicast': 5,
   'activitypub-http-fetcher': 1,
+  'activitypub-follow': 3,
   '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
 
@@ -86,7 +89,8 @@ let SCHEDULER_INTERVAL = 60000 * 60
 const CONFIG = {
   CUSTOM_FILE: getLocalConfigFilePath(),
   LISTEN: {
-    PORT: config.get<number>('listen.port')
+    PORT: config.get<number>('listen.port'),
+    HOSTNAME: config.get<string>('listen.hostname')
   },
   DATABASE: {
     DBNAME: 'peertube' + config.get<string>('database.suffix'),
@@ -422,6 +426,13 @@ const OPENGRAPH_AND_OEMBED_COMMENT = '<!-- open graph and oembed tags -->'
 
 // ---------------------------------------------------------------------------
 
+const FEEDS = {
+  COUNT: 20,
+  CACHE_LIFETIME: 1000 * 60 * 15 // 15 minutes
+}
+
+// ---------------------------------------------------------------------------
+
 // Special constants for a test instance
 if (isTestInstance() === true) {
   ACTOR_FOLLOW_SCORE.BASE = 20
@@ -453,6 +464,7 @@ export {
   LAST_MIGRATION_VERSION,
   OAUTH_LIFETIME,
   OPENGRAPH_AND_OEMBED_COMMENT,
+  BROADCAST_CONCURRENCY,
   PAGINATION_COUNT_DEFAULT,
   ACTOR_FOLLOW_SCORE,
   PREVIEWS_SIZE,
@@ -461,6 +473,7 @@ export {
   SERVER_ACTOR_NAME,
   PRIVATE_RSA_KEY_SIZE,
   SORTABLE_COLUMNS,
+  FEEDS,
   STATIC_MAX_AGE,
   STATIC_PATHS,
   ACTIVITY_PUB,