diff options
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 9201f95b3..f54ce9506 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -58,7 +58,7 @@ const WEBSERVER = { | |||
58 | 58 | ||
59 | // Sortable columns per schema | 59 | // Sortable columns per schema |
60 | const SORTABLE_COLUMNS = { | 60 | const SORTABLE_COLUMNS = { |
61 | USERS: [ 'id', 'username', 'videoQuotaUsed', 'createdAt', 'lastLoginDate', 'role' ], | 61 | ADMIN_USERS: [ 'id', 'username', 'videoQuotaUsed', 'createdAt', 'lastLoginDate', 'role' ], |
62 | USER_SUBSCRIPTIONS: [ 'id', 'createdAt' ], | 62 | USER_SUBSCRIPTIONS: [ 'id', 'createdAt' ], |
63 | ACCOUNTS: [ 'createdAt' ], | 63 | ACCOUNTS: [ 'createdAt' ], |
64 | JOBS: [ 'createdAt' ], | 64 | JOBS: [ 'createdAt' ], |
@@ -186,7 +186,7 @@ const JOB_TTL: { [id in JobType]: number } = { | |||
186 | 'video-file-import': 1000 * 3600, // 1 hour | 186 | 'video-file-import': 1000 * 3600, // 1 hour |
187 | 'video-transcoding': 1000 * 3600 * 48, // 2 days, transcoding could be long | 187 | 'video-transcoding': 1000 * 3600 * 48, // 2 days, transcoding could be long |
188 | 'video-studio-edition': 1000 * 3600 * 10, // 10 hours | 188 | 'video-studio-edition': 1000 * 3600 * 10, // 10 hours |
189 | 'video-import': 1000 * 3600 * 2, // 2 hours | 189 | 'video-import': CONFIG.IMPORT.VIDEOS.TIMEOUT, |
190 | 'email': 60000 * 10, // 10 minutes | 190 | 'email': 60000 * 10, // 10 minutes |
191 | 'actor-keys': 60000 * 20, // 20 minutes | 191 | 'actor-keys': 60000 * 20, // 20 minutes |
192 | 'videos-views-stats': undefined, // Unlimited | 192 | 'videos-views-stats': undefined, // Unlimited |
@@ -213,7 +213,7 @@ const CRAWL_REQUEST_CONCURRENCY = 1 // How many requests in parallel to fetch re | |||
213 | 213 | ||
214 | const AP_CLEANER = { | 214 | const AP_CLEANER = { |
215 | CONCURRENCY: 10, // How many requests in parallel we do in activitypub-cleaner job | 215 | CONCURRENCY: 10, // How many requests in parallel we do in activitypub-cleaner job |
216 | UNAVAILABLE_TRESHOLD: 3, // How many attemps we do before removing an unavailable remote resource | 216 | UNAVAILABLE_TRESHOLD: 3, // How many attempts we do before removing an unavailable remote resource |
217 | PERIOD: parseDurationToMs('1 week') // /!\ Has to be sync with REPEAT_JOBS | 217 | PERIOD: parseDurationToMs('1 week') // /!\ Has to be sync with REPEAT_JOBS |
218 | } | 218 | } |
219 | 219 | ||
@@ -734,12 +734,14 @@ const VIDEO_LIVE = { | |||
734 | const MEMOIZE_TTL = { | 734 | const MEMOIZE_TTL = { |
735 | OVERVIEWS_SAMPLE: 1000 * 3600 * 4, // 4 hours | 735 | OVERVIEWS_SAMPLE: 1000 * 3600 * 4, // 4 hours |
736 | INFO_HASH_EXISTS: 1000 * 3600 * 12, // 12 hours | 736 | INFO_HASH_EXISTS: 1000 * 3600 * 12, // 12 hours |
737 | VIDEO_DURATION: 1000 * 10, // 10 seconds | ||
737 | LIVE_ABLE_TO_UPLOAD: 1000 * 60, // 1 minute | 738 | LIVE_ABLE_TO_UPLOAD: 1000 * 60, // 1 minute |
738 | LIVE_CHECK_SOCKET_HEALTH: 1000 * 60 // 1 minute | 739 | LIVE_CHECK_SOCKET_HEALTH: 1000 * 60 // 1 minute |
739 | } | 740 | } |
740 | 741 | ||
741 | const MEMOIZE_LENGTH = { | 742 | const MEMOIZE_LENGTH = { |
742 | INFO_HASH_EXISTS: 200 | 743 | INFO_HASH_EXISTS: 200, |
744 | VIDEO_DURATION: 200 | ||
743 | } | 745 | } |
744 | 746 | ||
745 | const QUEUE_CONCURRENCY = { | 747 | const QUEUE_CONCURRENCY = { |
@@ -769,12 +771,6 @@ const CUSTOM_HTML_TAG_COMMENTS = { | |||
769 | SERVER_CONFIG: '<!-- server config -->' | 771 | SERVER_CONFIG: '<!-- server config -->' |
770 | } | 772 | } |
771 | 773 | ||
772 | // --------------------------------------------------------------------------- | ||
773 | |||
774 | const FEEDS = { | ||
775 | COUNT: 20 | ||
776 | } | ||
777 | |||
778 | const MAX_LOGS_OUTPUT_CHARACTERS = 10 * 1000 * 1000 | 774 | const MAX_LOGS_OUTPUT_CHARACTERS = 10 * 1000 * 1000 |
779 | const LOG_FILENAME = 'peertube.log' | 775 | const LOG_FILENAME = 'peertube.log' |
780 | const AUDIT_LOG_FILENAME = 'peertube-audit.log' | 776 | const AUDIT_LOG_FILENAME = 'peertube-audit.log' |
@@ -818,7 +814,7 @@ const STATS_TIMESERIE = { | |||
818 | // --------------------------------------------------------------------------- | 814 | // --------------------------------------------------------------------------- |
819 | 815 | ||
820 | // Special constants for a test instance | 816 | // Special constants for a test instance |
821 | if (isTestInstance() === true) { | 817 | if (isTestInstance() === true && process.env.PRODUCTION_CONSTANTS !== 'true') { |
822 | PRIVATE_RSA_KEY_SIZE = 1024 | 818 | PRIVATE_RSA_KEY_SIZE = 1024 |
823 | 819 | ||
824 | ACTOR_FOLLOW_SCORE.BASE = 20 | 820 | ACTOR_FOLLOW_SCORE.BASE = 20 |
@@ -942,7 +938,6 @@ export { | |||
942 | ROUTE_CACHE_LIFETIME, | 938 | ROUTE_CACHE_LIFETIME, |
943 | SORTABLE_COLUMNS, | 939 | SORTABLE_COLUMNS, |
944 | HLS_STREAMING_PLAYLIST_DIRECTORY, | 940 | HLS_STREAMING_PLAYLIST_DIRECTORY, |
945 | FEEDS, | ||
946 | JOB_TTL, | 941 | JOB_TTL, |
947 | DEFAULT_THEME_NAME, | 942 | DEFAULT_THEME_NAME, |
948 | NSFW_POLICY_TYPES, | 943 | NSFW_POLICY_TYPES, |