Server: fix requests endpoints

This commit is contained in:
Chocobozzz 2017-03-04 09:48:35 +01:00
parent 72329aaa28
commit 4b4660582b
3 changed files with 11 additions and 7 deletions

View File

@ -134,10 +134,9 @@ const REQUESTS_VIDEO_EVENT_LIMIT_PER_POD = 50
const RETRY_REQUESTS = 5 const RETRY_REQUESTS = 5
const REQUEST_ENDPOINTS = { const REQUEST_ENDPOINTS = {
VIDEOS: 'videos', VIDEOS: 'videos'
QADU: 'videos/qadu',
EVENT: 'videos/events'
} }
const REQUEST_ENDPOINT_ACTIONS = {} const REQUEST_ENDPOINT_ACTIONS = {}
REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] = { REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] = {
ADD: 'add', ADD: 'add',
@ -146,6 +145,9 @@ REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] = {
REPORT_ABUSE: 'report-abuse' REPORT_ABUSE: 'report-abuse'
} }
const REQUEST_VIDEO_QADU_ENDPOINT = 'videos/qadu'
const REQUEST_VIDEO_EVENT_ENDPOINT = 'videos/events'
const REQUEST_VIDEO_QADU_TYPES = { const REQUEST_VIDEO_QADU_TYPES = {
LIKES: 'likes', LIKES: 'likes',
DISLIKES: 'dislikes', DISLIKES: 'dislikes',
@ -227,16 +229,18 @@ module.exports = {
REMOTE_SCHEME, REMOTE_SCHEME,
REQUEST_ENDPOINT_ACTIONS, REQUEST_ENDPOINT_ACTIONS,
REQUEST_ENDPOINTS, REQUEST_ENDPOINTS,
REQUEST_VIDEO_EVENT_ENDPOINT,
REQUEST_VIDEO_EVENT_TYPES, REQUEST_VIDEO_EVENT_TYPES,
REQUEST_VIDEO_QADU_ENDPOINT,
REQUEST_VIDEO_QADU_TYPES, REQUEST_VIDEO_QADU_TYPES,
REQUESTS_IN_PARALLEL, REQUESTS_IN_PARALLEL,
REQUESTS_INTERVAL, REQUESTS_INTERVAL,
REQUESTS_LIMIT_PER_POD, REQUESTS_LIMIT_PER_POD,
REQUESTS_LIMIT_PODS, REQUESTS_LIMIT_PODS,
REQUESTS_VIDEO_QADU_LIMIT_PER_POD,
REQUESTS_VIDEO_QADU_LIMIT_PODS,
REQUESTS_VIDEO_EVENT_LIMIT_PER_POD, REQUESTS_VIDEO_EVENT_LIMIT_PER_POD,
REQUESTS_VIDEO_EVENT_LIMIT_PODS, REQUESTS_VIDEO_EVENT_LIMIT_PODS,
REQUESTS_VIDEO_QADU_LIMIT_PER_POD,
REQUESTS_VIDEO_QADU_LIMIT_PODS,
RETRY_REQUESTS, RETRY_REQUESTS,
SEARCHABLE_COLUMNS, SEARCHABLE_COLUMNS,
SIGNATURE_ALGORITHM, SIGNATURE_ALGORITHM,

View File

@ -45,7 +45,7 @@ module.exports = class RequestVideoEventScheduler extends BaseRequestScheduler {
if (!requestsToMakeGrouped[toPodId]) { if (!requestsToMakeGrouped[toPodId]) {
requestsToMakeGrouped[toPodId] = { requestsToMakeGrouped[toPodId] = {
toPod: eventToProcess.pod, toPod: eventToProcess.pod,
endpoint: constants.REQUEST_ENDPOINTS.EVENT, endpoint: constants.REQUEST_VIDEO_EVENT_ENDPOINT,
ids: [], // request ids, to delete them from the DB in the future ids: [], // request ids, to delete them from the DB in the future
datas: [] // requests data datas: [] // requests data
} }

View File

@ -37,7 +37,7 @@ module.exports = class RequestVideoQaduScheduler extends BaseRequestScheduler {
if (!requestsToMakeGrouped[hashKey]) { if (!requestsToMakeGrouped[hashKey]) {
requestsToMakeGrouped[hashKey] = { requestsToMakeGrouped[hashKey] = {
toPod: pod, toPod: pod,
endpoint: constants.REQUEST_ENDPOINTS.QADU, endpoint: constants.REQUEST_VIDEO_QADU_ENDPOINT,
ids: [], // request ids, to delete them from the DB in the future ids: [], // request ids, to delete them from the DB in the future
datas: [], // requests data datas: [], // requests data
videos: {} videos: {}