You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Request under limits, current count: (S = ${this.requestsThisSecond} | M = ${this.requestsThisMinute})`,
93
+
`API credits under limits, current count: (S = ${this.creditsThisSecond} | M = ${this.creditsThisMinute}, | C = ${creditCost})`,
93
94
)
94
95
}else{
95
96
logger.trace(
96
-
`Capacity for provider requests has been reached this interval (S = ${this.requestsThisSecond} | M = ${this.requestsThisMinute}), need to wait ${timeToWait}ms`,
97
+
`Capacity for provider API credits has been reached this interval (S = ${this.creditsThisSecond} | M = ${this.creditsThisMinute} | C = ${creditCost}), need to wait ${timeToWait}ms`,
97
98
)
98
99
awaitsleep(timeToWait)
99
100
this.updateIntervals()
100
101
}
102
+
this.creditsThisSecond+=creditCost
103
+
this.creditsThisMinute+=creditCost
101
104
102
-
this.requestsThisSecond++
103
-
this.requestsThisMinute++
104
105
logger.trace(
105
-
`Request is now ready to go, updated count: (S = ${this.requestsThisSecond} | M = ${this.requestsThisMinute})`,
106
+
`Request is now ready to go, updated count: (S = ${this.creditsThisSecond} | M = ${this.creditsThisMinute})`,
0 commit comments