diff --git a/server/controllers/api/requests.ts b/server/controllers/api/requests.ts index 2c18fe046..d3f0d958c 100644 --- a/server/controllers/api/requests.ts +++ b/server/controllers/api/requests.ts @@ -2,7 +2,7 @@ import * as express from 'express' import { parallel } from 'async' import { - BaseRequestScheduler, + AbstractRequestScheduler, getRequestScheduler, getRequestVideoQaduScheduler, getRequestVideoEventScheduler @@ -39,7 +39,7 @@ function getStatsRequests (req: express.Request, res: express.Response, next: ex // --------------------------------------------------------------------------- -function buildRequestSchedulerFunction (requestScheduler: BaseRequestScheduler) { +function buildRequestSchedulerFunction (requestScheduler: AbstractRequestScheduler) { return function (callback) { requestScheduler.remainingRequestsCount(function (err, count) { if (err) return callback(err) diff --git a/server/lib/request/base-request-scheduler.ts b/server/lib/request/abstract-request-scheduler.ts similarity index 98% rename from server/lib/request/base-request-scheduler.ts rename to server/lib/request/abstract-request-scheduler.ts index 26bdc2bff..e81ab9c36 100644 --- a/server/lib/request/base-request-scheduler.ts +++ b/server/lib/request/abstract-request-scheduler.ts @@ -9,7 +9,7 @@ import { REQUESTS_INTERVAL } from '../../initializers' -abstract class BaseRequestScheduler { +abstract class AbstractRequestScheduler { requestInterval: number limitPods: number limitPerPod: number @@ -152,5 +152,5 @@ abstract class BaseRequestScheduler { // --------------------------------------------------------------------------- export { - BaseRequestScheduler + AbstractRequestScheduler } diff --git a/server/lib/request/index.ts b/server/lib/request/index.ts index 110d0ed78..47d60e5b4 100644 --- a/server/lib/request/index.ts +++ b/server/lib/request/index.ts @@ -1,4 +1,4 @@ -export * from './base-request-scheduler' +export * from './abstract-request-scheduler' export * from './request-scheduler' export * from './request-video-event-scheduler' export * from './request-video-qadu-scheduler' diff --git a/server/lib/request/request-scheduler.ts b/server/lib/request/request-scheduler.ts index 69d840eeb..38c0cca3d 100644 --- a/server/lib/request/request-scheduler.ts +++ b/server/lib/request/request-scheduler.ts @@ -1,7 +1,7 @@ import * as Sequelize from 'sequelize' import { database as db } from '../../initializers/database' -import { BaseRequestScheduler } from './base-request-scheduler' +import { AbstractRequestScheduler } from './abstract-request-scheduler' import { logger } from '../../helpers' import { REQUESTS_LIMIT_PODS, @@ -16,7 +16,7 @@ export type RequestSchedulerOptions = { transaction: Sequelize.Transaction } -class RequestScheduler extends BaseRequestScheduler { +class RequestScheduler extends AbstractRequestScheduler { constructor () { super() diff --git a/server/lib/request/request-video-event-scheduler.ts b/server/lib/request/request-video-event-scheduler.ts index 9da82585e..c9d165117 100644 --- a/server/lib/request/request-video-event-scheduler.ts +++ b/server/lib/request/request-video-event-scheduler.ts @@ -1,7 +1,7 @@ import * as Sequelize from 'sequelize' import { database as db } from '../../initializers/database' -import { BaseRequestScheduler } from './base-request-scheduler' +import { AbstractRequestScheduler } from './abstract-request-scheduler' import { REQUESTS_VIDEO_EVENT_LIMIT_PODS, REQUESTS_VIDEO_EVENT_LIMIT_PER_POD, @@ -15,7 +15,7 @@ export type RequestVideoEventSchedulerOptions = { transaction?: Sequelize.Transaction } -class RequestVideoEventScheduler extends BaseRequestScheduler { +class RequestVideoEventScheduler extends AbstractRequestScheduler { constructor () { super() diff --git a/server/lib/request/request-video-qadu-scheduler.ts b/server/lib/request/request-video-qadu-scheduler.ts index 436fd8e50..49970a2e6 100644 --- a/server/lib/request/request-video-qadu-scheduler.ts +++ b/server/lib/request/request-video-qadu-scheduler.ts @@ -1,7 +1,7 @@ import * as Sequelize from 'sequelize' import { database as db } from '../../initializers/database' -import { BaseRequestScheduler } from './base-request-scheduler' +import { AbstractRequestScheduler } from './abstract-request-scheduler' import { logger } from '../../helpers' import { REQUESTS_VIDEO_QADU_LIMIT_PODS, @@ -16,7 +16,7 @@ export type RequestVideoQaduSchedulerOptions = { transaction?: Sequelize.Transaction } -class RequestVideoQaduScheduler extends BaseRequestScheduler { +class RequestVideoQaduScheduler extends AbstractRequestScheduler { constructor () { super()