1 import { RequestSchedulerAttributes as FormatedRequestSchedulerAttributes } from '../../../../../../shared'
3 export interface Request {
8 export class RequestSchedulerStatsAttributes implements FormatedRequestSchedulerAttributes {
9 requestsLimitPods: number
10 requestsLimitPerPod: number
11 milliSecondsInterval: number
12 remainingMilliSeconds: number
16 requestsLimitPods: number,
17 requestsLimitPerPod: number,
18 milliSecondsInterval: number,
19 remainingMilliSeconds: number,
22 this.requestsLimitPods = hash.requestsLimitPods
23 this.requestsLimitPerPod = hash.requestsLimitPerPod
24 this.milliSecondsInterval = hash.milliSecondsInterval
25 this.remainingMilliSeconds = hash.remainingMilliSeconds
26 this.totalRequests = hash.totalRequests
29 get remainingSeconds () {
30 return Math.floor(this.remainingMilliSeconds / 1000)
33 get secondsInterva () {
34 return Math.floor(this.milliSecondsInterval / 1000)