fix ratelimit query
This commit is contained in:
Vendored
+1
-2
@@ -198,7 +198,6 @@ query {
|
|||||||
cost
|
cost
|
||||||
remaining
|
remaining
|
||||||
resetAt
|
resetAt
|
||||||
node
|
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
function getRateLimit(token) {
|
function getRateLimit(token) {
|
||||||
@@ -214,7 +213,7 @@ function getRateLimit(token) {
|
|||||||
}
|
}
|
||||||
exports.getRateLimit = getRateLimit;
|
exports.getRateLimit = getRateLimit;
|
||||||
function deletePackageVersion(packageVersionId, token) {
|
function deletePackageVersion(packageVersionId, token) {
|
||||||
getRateLimit(token).pipe(operators_1.map(value => console.log(`login: ${value.viewer.login}, rate limit: ${value.ratelimit.limit}, cost: ${value.ratelimit.cost}, remaining: ${value.ratelimit.remaining}, node: ${value.ratelimit.node}`)));
|
getRateLimit(token).pipe(operators_1.map(value => console.log(`login: ${value.viewer.login}, rate limit: ${value.ratelimit.limit}, cost: ${value.ratelimit.cost}, remaining: ${value.ratelimit.remaining}`)));
|
||||||
if (deleted === 99) {
|
if (deleted === 99) {
|
||||||
console.log(`reaching rate limit`);
|
console.log(`reaching rate limit`);
|
||||||
operators_1.delay(5000);
|
operators_1.delay(5000);
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ export interface RateLimitResponse {
|
|||||||
cost: number
|
cost: number
|
||||||
remaining: number
|
remaining: number
|
||||||
resetAt: string
|
resetAt: string
|
||||||
node: number
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +40,6 @@ query {
|
|||||||
cost
|
cost
|
||||||
remaining
|
remaining
|
||||||
resetAt
|
resetAt
|
||||||
node
|
|
||||||
}
|
}
|
||||||
}`
|
}`
|
||||||
|
|
||||||
@@ -70,7 +68,7 @@ export function deletePackageVersion(
|
|||||||
getRateLimit(token).pipe(
|
getRateLimit(token).pipe(
|
||||||
map(value =>
|
map(value =>
|
||||||
console.log(
|
console.log(
|
||||||
`login: ${value.viewer.login}, rate limit: ${value.ratelimit.limit}, cost: ${value.ratelimit.cost}, remaining: ${value.ratelimit.remaining}, node: ${value.ratelimit.node}`
|
`login: ${value.viewer.login}, rate limit: ${value.ratelimit.limit}, cost: ${value.ratelimit.cost}, remaining: ${value.ratelimit.remaining}`
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user