]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/constants.js
Server: do not enable images tests by default because it needs a special
[github/Chocobozzz/PeerTube.git] / server / initializers / constants.js
index 55c555d04c086eff23236e0d5be59758506270d3..7fcf5b01bb2fb219f489e8d3379be35acd740eb0 100644 (file)
@@ -12,6 +12,11 @@ const FRIEND_SCORE = {
 // Time to wait between requests to the friends (10 min)
 let INTERVAL = 600000
 
+const OAUTH_LIFETIME = {
+  ACCESS_TOKEN: 3600 * 4, // 4 hours
+  REFRESH_TOKEN: 1209600 // 2 weeks
+}
+
 // Number of results by default for the pagination
 const PAGINATION_COUNT_DEFAULT = 15
 
@@ -24,6 +29,9 @@ const PODS_SCORE = {
 // Number of requests in parallel we can make
 const REQUESTS_IN_PARALLEL = 10
 
+// How many requests we put in request (request scheduler)
+const REQUESTS_LIMIT = 10
+
 // Number of requests to retry for replay requests module
 const RETRY_REQUESTS = 5
 
@@ -68,9 +76,11 @@ module.exports = {
   API_VERSION: API_VERSION,
   FRIEND_SCORE: FRIEND_SCORE,
   INTERVAL: INTERVAL,
+  OAUTH_LIFETIME: OAUTH_LIFETIME,
   PAGINATION_COUNT_DEFAULT: PAGINATION_COUNT_DEFAULT,
   PODS_SCORE: PODS_SCORE,
   REQUESTS_IN_PARALLEL: REQUESTS_IN_PARALLEL,
+  REQUESTS_LIMIT: REQUESTS_LIMIT,
   RETRY_REQUESTS: RETRY_REQUESTS,
   SEARCHABLE_COLUMNS: SEARCHABLE_COLUMNS,
   SORTABLE_COLUMNS: SORTABLE_COLUMNS,