aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/initializers/constants.js14
-rw-r--r--server/lib/request-video-event-scheduler.js2
-rw-r--r--server/lib/request-video-qadu-scheduler.js2
3 files changed, 11 insertions, 7 deletions
diff --git a/server/initializers/constants.js b/server/initializers/constants.js
index e33229163..2d5bb84cc 100644
--- a/server/initializers/constants.js
+++ b/server/initializers/constants.js
@@ -134,10 +134,9 @@ const REQUESTS_VIDEO_EVENT_LIMIT_PER_POD = 50
134const RETRY_REQUESTS = 5 134const RETRY_REQUESTS = 5
135 135
136const REQUEST_ENDPOINTS = { 136const REQUEST_ENDPOINTS = {
137 VIDEOS: 'videos', 137 VIDEOS: 'videos'
138 QADU: 'videos/qadu',
139 EVENT: 'videos/events'
140} 138}
139
141const REQUEST_ENDPOINT_ACTIONS = {} 140const REQUEST_ENDPOINT_ACTIONS = {}
142REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] = { 141REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] = {
143 ADD: 'add', 142 ADD: 'add',
@@ -146,6 +145,9 @@ REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] = {
146 REPORT_ABUSE: 'report-abuse' 145 REPORT_ABUSE: 'report-abuse'
147} 146}
148 147
148const REQUEST_VIDEO_QADU_ENDPOINT = 'videos/qadu'
149const REQUEST_VIDEO_EVENT_ENDPOINT = 'videos/events'
150
149const REQUEST_VIDEO_QADU_TYPES = { 151const REQUEST_VIDEO_QADU_TYPES = {
150 LIKES: 'likes', 152 LIKES: 'likes',
151 DISLIKES: 'dislikes', 153 DISLIKES: 'dislikes',
@@ -227,16 +229,18 @@ module.exports = {
227 REMOTE_SCHEME, 229 REMOTE_SCHEME,
228 REQUEST_ENDPOINT_ACTIONS, 230 REQUEST_ENDPOINT_ACTIONS,
229 REQUEST_ENDPOINTS, 231 REQUEST_ENDPOINTS,
232 REQUEST_VIDEO_EVENT_ENDPOINT,
230 REQUEST_VIDEO_EVENT_TYPES, 233 REQUEST_VIDEO_EVENT_TYPES,
234 REQUEST_VIDEO_QADU_ENDPOINT,
231 REQUEST_VIDEO_QADU_TYPES, 235 REQUEST_VIDEO_QADU_TYPES,
232 REQUESTS_IN_PARALLEL, 236 REQUESTS_IN_PARALLEL,
233 REQUESTS_INTERVAL, 237 REQUESTS_INTERVAL,
234 REQUESTS_LIMIT_PER_POD, 238 REQUESTS_LIMIT_PER_POD,
235 REQUESTS_LIMIT_PODS, 239 REQUESTS_LIMIT_PODS,
236 REQUESTS_VIDEO_QADU_LIMIT_PER_POD,
237 REQUESTS_VIDEO_QADU_LIMIT_PODS,
238 REQUESTS_VIDEO_EVENT_LIMIT_PER_POD, 240 REQUESTS_VIDEO_EVENT_LIMIT_PER_POD,
239 REQUESTS_VIDEO_EVENT_LIMIT_PODS, 241 REQUESTS_VIDEO_EVENT_LIMIT_PODS,
242 REQUESTS_VIDEO_QADU_LIMIT_PER_POD,
243 REQUESTS_VIDEO_QADU_LIMIT_PODS,
240 RETRY_REQUESTS, 244 RETRY_REQUESTS,
241 SEARCHABLE_COLUMNS, 245 SEARCHABLE_COLUMNS,
242 SIGNATURE_ALGORITHM, 246 SIGNATURE_ALGORITHM,
diff --git a/server/lib/request-video-event-scheduler.js b/server/lib/request-video-event-scheduler.js
index f178df49e..c7631253a 100644
--- a/server/lib/request-video-event-scheduler.js
+++ b/server/lib/request-video-event-scheduler.js
@@ -45,7 +45,7 @@ module.exports = class RequestVideoEventScheduler extends BaseRequestScheduler {
45 if (!requestsToMakeGrouped[toPodId]) { 45 if (!requestsToMakeGrouped[toPodId]) {
46 requestsToMakeGrouped[toPodId] = { 46 requestsToMakeGrouped[toPodId] = {
47 toPod: eventToProcess.pod, 47 toPod: eventToProcess.pod,
48 endpoint: constants.REQUEST_ENDPOINTS.EVENT, 48 endpoint: constants.REQUEST_VIDEO_EVENT_ENDPOINT,
49 ids: [], // request ids, to delete them from the DB in the future 49 ids: [], // request ids, to delete them from the DB in the future
50 datas: [] // requests data 50 datas: [] // requests data
51 } 51 }
diff --git a/server/lib/request-video-qadu-scheduler.js b/server/lib/request-video-qadu-scheduler.js
index bfccc5234..ac50cfc11 100644
--- a/server/lib/request-video-qadu-scheduler.js
+++ b/server/lib/request-video-qadu-scheduler.js
@@ -37,7 +37,7 @@ module.exports = class RequestVideoQaduScheduler extends BaseRequestScheduler {
37 if (!requestsToMakeGrouped[hashKey]) { 37 if (!requestsToMakeGrouped[hashKey]) {
38 requestsToMakeGrouped[hashKey] = { 38 requestsToMakeGrouped[hashKey] = {
39 toPod: pod, 39 toPod: pod,
40 endpoint: constants.REQUEST_ENDPOINTS.QADU, 40 endpoint: constants.REQUEST_VIDEO_QADU_ENDPOINT,
41 ids: [], // request ids, to delete them from the DB in the future 41 ids: [], // request ids, to delete them from the DB in the future
42 datas: [], // requests data 42 datas: [], // requests data
43 videos: {} 43 videos: {}