]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - initializers/constants.js
6 function isTestInstance () {
7 return (process
.env
.NODE_ENV
=== 'test')
10 // API version of our pod
11 constants
.API_VERSION
= 'v1'
13 // Score a pod has when we create it as a friend
14 constants
.FRIEND_BASE_SCORE
= 100
16 // Time to wait between requests to the friends
17 constants
.INTERVAL
= 60000
19 // Number of points we add/remove from a friend after a successful/bad request
20 constants
.PODS_SCORE
= {
25 // Number of retries we make for the make retry requests (to friends...)
26 constants
.REQUEST_RETRIES
= 10
28 // Special constants for a test instance
29 if (isTestInstance() === true) {
30 constants
.FRIEND_BASE_SCORE
= 20
31 constants
.INTERVAL
= 10000
32 constants
.REQUEST_RETRIES
= 2
35 // ----------- Export -----------
36 module
.exports
= constants