const API_VERSION = 'v1'
// Score a pod has when we create it as a friend
-let FRIEND_BASE_SCORE = 100
+const FRIEND_SCORE = {
+ BASE: 100,
+ MAX: 1000
+}
// 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
// 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
// Special constants for a test instance
if (isTestInstance() === true) {
- FRIEND_BASE_SCORE = 20
+ FRIEND_SCORE.BASE = 20
INTERVAL = 10000
VIDEOS_CONSTRAINTS_FIELDS.DURATION.max = 14
}
module.exports = {
API_VERSION: API_VERSION,
- FRIEND_BASE_SCORE: FRIEND_BASE_SCORE,
+ 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,