aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-16 09:14:41 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-16 09:14:41 +0200
commit15a302943d84bc0978b84fe33110c4daa451d311 (patch)
treef4c4f626d94fced1c398d7fa9644c6d8fb9d5871 /server
parented5f91633d96436408c763bb96d2cc463cb7dc00 (diff)
downloadPeerTube-15a302943d84bc0978b84fe33110c4daa451d311.tar.gz
PeerTube-15a302943d84bc0978b84fe33110c4daa451d311.tar.zst
PeerTube-15a302943d84bc0978b84fe33110c4daa451d311.zip
BaseRequestScheduler -> AbstractRequestScheduler
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/requests.ts4
-rw-r--r--server/lib/request/abstract-request-scheduler.ts (renamed from server/lib/request/base-request-scheduler.ts)4
-rw-r--r--server/lib/request/index.ts2
-rw-r--r--server/lib/request/request-scheduler.ts4
-rw-r--r--server/lib/request/request-video-event-scheduler.ts4
-rw-r--r--server/lib/request/request-video-qadu-scheduler.ts4
6 files changed, 11 insertions, 11 deletions
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'
2import { parallel } from 'async' 2import { parallel } from 'async'
3 3
4import { 4import {
5 BaseRequestScheduler, 5 AbstractRequestScheduler,
6 getRequestScheduler, 6 getRequestScheduler,
7 getRequestVideoQaduScheduler, 7 getRequestVideoQaduScheduler,
8 getRequestVideoEventScheduler 8 getRequestVideoEventScheduler
@@ -39,7 +39,7 @@ function getStatsRequests (req: express.Request, res: express.Response, next: ex
39 39
40// --------------------------------------------------------------------------- 40// ---------------------------------------------------------------------------
41 41
42function buildRequestSchedulerFunction (requestScheduler: BaseRequestScheduler) { 42function buildRequestSchedulerFunction (requestScheduler: AbstractRequestScheduler) {
43 return function (callback) { 43 return function (callback) {
44 requestScheduler.remainingRequestsCount(function (err, count) { 44 requestScheduler.remainingRequestsCount(function (err, count) {
45 if (err) return callback(err) 45 if (err) return callback(err)
diff --git a/server/lib/request/base-request-scheduler.ts b/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 {
9 REQUESTS_INTERVAL 9 REQUESTS_INTERVAL
10} from '../../initializers' 10} from '../../initializers'
11 11
12abstract class BaseRequestScheduler { 12abstract class AbstractRequestScheduler {
13 requestInterval: number 13 requestInterval: number
14 limitPods: number 14 limitPods: number
15 limitPerPod: number 15 limitPerPod: number
@@ -152,5 +152,5 @@ abstract class BaseRequestScheduler {
152// --------------------------------------------------------------------------- 152// ---------------------------------------------------------------------------
153 153
154export { 154export {
155 BaseRequestScheduler 155 AbstractRequestScheduler
156} 156}
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 @@
1export * from './base-request-scheduler' 1export * from './abstract-request-scheduler'
2export * from './request-scheduler' 2export * from './request-scheduler'
3export * from './request-video-event-scheduler' 3export * from './request-video-event-scheduler'
4export * from './request-video-qadu-scheduler' 4export * 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 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2 2
3import { database as db } from '../../initializers/database' 3import { database as db } from '../../initializers/database'
4import { BaseRequestScheduler } from './base-request-scheduler' 4import { AbstractRequestScheduler } from './abstract-request-scheduler'
5import { logger } from '../../helpers' 5import { logger } from '../../helpers'
6import { 6import {
7 REQUESTS_LIMIT_PODS, 7 REQUESTS_LIMIT_PODS,
@@ -16,7 +16,7 @@ export type RequestSchedulerOptions = {
16 transaction: Sequelize.Transaction 16 transaction: Sequelize.Transaction
17} 17}
18 18
19class RequestScheduler extends BaseRequestScheduler { 19class RequestScheduler extends AbstractRequestScheduler {
20 constructor () { 20 constructor () {
21 super() 21 super()
22 22
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 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2 2
3import { database as db } from '../../initializers/database' 3import { database as db } from '../../initializers/database'
4import { BaseRequestScheduler } from './base-request-scheduler' 4import { AbstractRequestScheduler } from './abstract-request-scheduler'
5import { 5import {
6 REQUESTS_VIDEO_EVENT_LIMIT_PODS, 6 REQUESTS_VIDEO_EVENT_LIMIT_PODS,
7 REQUESTS_VIDEO_EVENT_LIMIT_PER_POD, 7 REQUESTS_VIDEO_EVENT_LIMIT_PER_POD,
@@ -15,7 +15,7 @@ export type RequestVideoEventSchedulerOptions = {
15 transaction?: Sequelize.Transaction 15 transaction?: Sequelize.Transaction
16} 16}
17 17
18class RequestVideoEventScheduler extends BaseRequestScheduler { 18class RequestVideoEventScheduler extends AbstractRequestScheduler {
19 constructor () { 19 constructor () {
20 super() 20 super()
21 21
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 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2 2
3import { database as db } from '../../initializers/database' 3import { database as db } from '../../initializers/database'
4import { BaseRequestScheduler } from './base-request-scheduler' 4import { AbstractRequestScheduler } from './abstract-request-scheduler'
5import { logger } from '../../helpers' 5import { logger } from '../../helpers'
6import { 6import {
7 REQUESTS_VIDEO_QADU_LIMIT_PODS, 7 REQUESTS_VIDEO_QADU_LIMIT_PODS,
@@ -16,7 +16,7 @@ export type RequestVideoQaduSchedulerOptions = {
16 transaction?: Sequelize.Transaction 16 transaction?: Sequelize.Transaction
17} 17}
18 18
19class RequestVideoQaduScheduler extends BaseRequestScheduler { 19class RequestVideoQaduScheduler extends AbstractRequestScheduler {
20 constructor () { 20 constructor () {
21 super() 21 super()
22 22