]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - initializers/constants.js
4 // API version of our pod
7 // Score a pod has when we create it as a friend
8 var FRIEND_BASE_SCORE
= 100
10 // Time to wait between requests to the friends
13 // Number of points we add/remove from a friend after a successful/bad request
19 // Number of retries we make for the make retry requests (to friends...)
20 var REQUEST_RETRIES
= 10
22 // Special constants for a test instance
23 if (isTestInstance() === true) {
24 FRIEND_BASE_SCORE
= 20
29 // ---------------------------------------------------------------------------
32 API_VERSION: API_VERSION
,
33 FRIEND_BASE_SCORE: FRIEND_BASE_SCORE
,
35 PODS_SCORE: PODS_SCORE
,
36 REQUEST_RETRIES: REQUEST_RETRIES
39 // ---------------------------------------------------------------------------
41 function isTestInstance () {
42 return (process
.env
.NODE_ENV
=== 'test')