1
0
Fork 0

BaseRequestScheduler -> AbstractRequestScheduler

This commit is contained in:
Chocobozzz 2017-06-16 09:14:41 +02:00
parent ed5f91633d
commit 15a302943d
6 changed files with 11 additions and 11 deletions

View file

@ -2,7 +2,7 @@ import * as express from 'express'
import { parallel } from 'async' import { parallel } from 'async'
import { import {
BaseRequestScheduler, AbstractRequestScheduler,
getRequestScheduler, getRequestScheduler,
getRequestVideoQaduScheduler, getRequestVideoQaduScheduler,
getRequestVideoEventScheduler 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) { return function (callback) {
requestScheduler.remainingRequestsCount(function (err, count) { requestScheduler.remainingRequestsCount(function (err, count) {
if (err) return callback(err) if (err) return callback(err)

View file

@ -9,7 +9,7 @@ import {
REQUESTS_INTERVAL REQUESTS_INTERVAL
} from '../../initializers' } from '../../initializers'
abstract class BaseRequestScheduler { abstract class AbstractRequestScheduler {
requestInterval: number requestInterval: number
limitPods: number limitPods: number
limitPerPod: number limitPerPod: number
@ -152,5 +152,5 @@ abstract class BaseRequestScheduler {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
export { export {
BaseRequestScheduler AbstractRequestScheduler
} }

View file

@ -1,4 +1,4 @@
export * from './base-request-scheduler' export * from './abstract-request-scheduler'
export * from './request-scheduler' export * from './request-scheduler'
export * from './request-video-event-scheduler' export * from './request-video-event-scheduler'
export * from './request-video-qadu-scheduler' export * from './request-video-qadu-scheduler'

View file

@ -1,7 +1,7 @@
import * as Sequelize from 'sequelize' import * as Sequelize from 'sequelize'
import { database as db } from '../../initializers/database' import { database as db } from '../../initializers/database'
import { BaseRequestScheduler } from './base-request-scheduler' import { AbstractRequestScheduler } from './abstract-request-scheduler'
import { logger } from '../../helpers' import { logger } from '../../helpers'
import { import {
REQUESTS_LIMIT_PODS, REQUESTS_LIMIT_PODS,
@ -16,7 +16,7 @@ export type RequestSchedulerOptions = {
transaction: Sequelize.Transaction transaction: Sequelize.Transaction
} }
class RequestScheduler extends BaseRequestScheduler { class RequestScheduler extends AbstractRequestScheduler {
constructor () { constructor () {
super() super()

View file

@ -1,7 +1,7 @@
import * as Sequelize from 'sequelize' import * as Sequelize from 'sequelize'
import { database as db } from '../../initializers/database' import { database as db } from '../../initializers/database'
import { BaseRequestScheduler } from './base-request-scheduler' import { AbstractRequestScheduler } from './abstract-request-scheduler'
import { import {
REQUESTS_VIDEO_EVENT_LIMIT_PODS, REQUESTS_VIDEO_EVENT_LIMIT_PODS,
REQUESTS_VIDEO_EVENT_LIMIT_PER_POD, REQUESTS_VIDEO_EVENT_LIMIT_PER_POD,
@ -15,7 +15,7 @@ export type RequestVideoEventSchedulerOptions = {
transaction?: Sequelize.Transaction transaction?: Sequelize.Transaction
} }
class RequestVideoEventScheduler extends BaseRequestScheduler { class RequestVideoEventScheduler extends AbstractRequestScheduler {
constructor () { constructor () {
super() super()

View file

@ -1,7 +1,7 @@
import * as Sequelize from 'sequelize' import * as Sequelize from 'sequelize'
import { database as db } from '../../initializers/database' import { database as db } from '../../initializers/database'
import { BaseRequestScheduler } from './base-request-scheduler' import { AbstractRequestScheduler } from './abstract-request-scheduler'
import { logger } from '../../helpers' import { logger } from '../../helpers'
import { import {
REQUESTS_VIDEO_QADU_LIMIT_PODS, REQUESTS_VIDEO_QADU_LIMIT_PODS,
@ -16,7 +16,7 @@ export type RequestVideoQaduSchedulerOptions = {
transaction?: Sequelize.Transaction transaction?: Sequelize.Transaction
} }
class RequestVideoQaduScheduler extends BaseRequestScheduler { class RequestVideoQaduScheduler extends AbstractRequestScheduler {
constructor () { constructor () {
super() super()