aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/constants.js24
1 files changed, 22 insertions, 2 deletions
diff --git a/server/initializers/constants.js b/server/initializers/constants.js
index 668bfe56c..b99186e13 100644
--- a/server/initializers/constants.js
+++ b/server/initializers/constants.js
@@ -85,7 +85,13 @@ const CONSTRAINTS_FIELDS = {
85 TAGS: { min: 1, max: 3 }, // Number of total tags 85 TAGS: { min: 1, max: 3 }, // Number of total tags
86 TAG: { min: 2, max: 10 }, // Length 86 TAG: { min: 2, max: 10 }, // Length
87 THUMBNAIL: { min: 2, max: 30 }, 87 THUMBNAIL: { min: 2, max: 30 },
88 THUMBNAIL_DATA: { min: 0, max: 20000 } // Bytes 88 THUMBNAIL_DATA: { min: 0, max: 20000 }, // Bytes
89 VIEWS: { min: 0 },
90 LIKES: { min: 0 },
91 DISLIKES: { min: 0 }
92 },
93 VIDEO_EVENTS: {
94 COUNT: { min: 0 }
89 } 95 }
90} 96}
91 97
@@ -120,12 +126,17 @@ const REQUESTS_VIDEO_QADU_LIMIT_PODS = 10
120// The QADU requests are not big 126// The QADU requests are not big
121const REQUESTS_VIDEO_QADU_LIMIT_PER_POD = 50 127const REQUESTS_VIDEO_QADU_LIMIT_PER_POD = 50
122 128
129const REQUESTS_VIDEO_EVENT_LIMIT_PODS = 10
130// The EVENTS requests are not big
131const REQUESTS_VIDEO_EVENT_LIMIT_PER_POD = 50
132
123// Number of requests to retry for replay requests module 133// Number of requests to retry for replay requests module
124const RETRY_REQUESTS = 5 134const RETRY_REQUESTS = 5
125 135
126const REQUEST_ENDPOINTS = { 136const REQUEST_ENDPOINTS = {
127 VIDEOS: 'videos', 137 VIDEOS: 'videos',
128 QADU: 'videos/qadu' 138 QADU: 'videos/qadu',
139 EVENT: 'videos/events'
129} 140}
130const REQUEST_ENDPOINT_ACTIONS = {} 141const REQUEST_ENDPOINT_ACTIONS = {}
131REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] = { 142REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] = {
@@ -141,6 +152,12 @@ const REQUEST_VIDEO_QADU_TYPES = {
141 VIEWS: 'views' 152 VIEWS: 'views'
142} 153}
143 154
155const REQUEST_VIDEO_EVENT_TYPES = {
156 LIKES: 'likes',
157 DISLIKES: 'dislikes',
158 VIEWS: 'views'
159}
160
144const REMOTE_SCHEME = { 161const REMOTE_SCHEME = {
145 HTTP: 'https', 162 HTTP: 'https',
146 WS: 'wss' 163 WS: 'wss'
@@ -210,6 +227,7 @@ module.exports = {
210 REMOTE_SCHEME, 227 REMOTE_SCHEME,
211 REQUEST_ENDPOINT_ACTIONS, 228 REQUEST_ENDPOINT_ACTIONS,
212 REQUEST_ENDPOINTS, 229 REQUEST_ENDPOINTS,
230 REQUEST_VIDEO_EVENT_TYPES,
213 REQUEST_VIDEO_QADU_TYPES, 231 REQUEST_VIDEO_QADU_TYPES,
214 REQUESTS_IN_PARALLEL, 232 REQUESTS_IN_PARALLEL,
215 REQUESTS_INTERVAL, 233 REQUESTS_INTERVAL,
@@ -217,6 +235,8 @@ module.exports = {
217 REQUESTS_LIMIT_PODS, 235 REQUESTS_LIMIT_PODS,
218 REQUESTS_VIDEO_QADU_LIMIT_PER_POD, 236 REQUESTS_VIDEO_QADU_LIMIT_PER_POD,
219 REQUESTS_VIDEO_QADU_LIMIT_PODS, 237 REQUESTS_VIDEO_QADU_LIMIT_PODS,
238 REQUESTS_VIDEO_EVENT_LIMIT_PER_POD,
239 REQUESTS_VIDEO_EVENT_LIMIT_PODS,
220 RETRY_REQUESTS, 240 RETRY_REQUESTS,
221 SEARCHABLE_COLUMNS, 241 SEARCHABLE_COLUMNS,
222 SIGNATURE_ALGORITHM, 242 SIGNATURE_ALGORITHM,