diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 09:14:41 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 09:14:41 +0200 |
commit | 15a302943d84bc0978b84fe33110c4daa451d311 (patch) | |
tree | f4c4f626d94fced1c398d7fa9644c6d8fb9d5871 /server | |
parent | ed5f91633d96436408c763bb96d2cc463cb7dc00 (diff) | |
download | PeerTube-15a302943d84bc0978b84fe33110c4daa451d311.tar.gz PeerTube-15a302943d84bc0978b84fe33110c4daa451d311.tar.zst PeerTube-15a302943d84bc0978b84fe33110c4daa451d311.zip |
BaseRequestScheduler -> AbstractRequestScheduler
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/api/requests.ts | 4 | ||||
-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.ts | 2 | ||||
-rw-r--r-- | server/lib/request/request-scheduler.ts | 4 | ||||
-rw-r--r-- | server/lib/request/request-video-event-scheduler.ts | 4 | ||||
-rw-r--r-- | server/lib/request/request-video-qadu-scheduler.ts | 4 |
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' | |||
2 | import { parallel } from 'async' | 2 | import { parallel } from 'async' |
3 | 3 | ||
4 | import { | 4 | import { |
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 | ||
42 | function buildRequestSchedulerFunction (requestScheduler: BaseRequestScheduler) { | 42 | function 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 | ||
12 | abstract class BaseRequestScheduler { | 12 | abstract 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 | ||
154 | export { | 154 | export { |
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 @@ | |||
1 | export * from './base-request-scheduler' | 1 | export * from './abstract-request-scheduler' |
2 | export * from './request-scheduler' | 2 | export * from './request-scheduler' |
3 | export * from './request-video-event-scheduler' | 3 | export * from './request-video-event-scheduler' |
4 | export * from './request-video-qadu-scheduler' | 4 | 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 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | 2 | ||
3 | import { database as db } from '../../initializers/database' | 3 | import { database as db } from '../../initializers/database' |
4 | import { BaseRequestScheduler } from './base-request-scheduler' | 4 | import { AbstractRequestScheduler } from './abstract-request-scheduler' |
5 | import { logger } from '../../helpers' | 5 | import { logger } from '../../helpers' |
6 | import { | 6 | import { |
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 | ||
19 | class RequestScheduler extends BaseRequestScheduler { | 19 | class 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 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | 2 | ||
3 | import { database as db } from '../../initializers/database' | 3 | import { database as db } from '../../initializers/database' |
4 | import { BaseRequestScheduler } from './base-request-scheduler' | 4 | import { AbstractRequestScheduler } from './abstract-request-scheduler' |
5 | import { | 5 | import { |
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 | ||
18 | class RequestVideoEventScheduler extends BaseRequestScheduler { | 18 | class 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 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | 2 | ||
3 | import { database as db } from '../../initializers/database' | 3 | import { database as db } from '../../initializers/database' |
4 | import { BaseRequestScheduler } from './base-request-scheduler' | 4 | import { AbstractRequestScheduler } from './abstract-request-scheduler' |
5 | import { logger } from '../../helpers' | 5 | import { logger } from '../../helpers' |
6 | import { | 6 | import { |
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 | ||
19 | class RequestVideoQaduScheduler extends BaseRequestScheduler { | 19 | class RequestVideoQaduScheduler extends AbstractRequestScheduler { |
20 | constructor () { | 20 | constructor () { |
21 | super() | 21 | super() |
22 | 22 | ||