reverts disabling keys which have gone above hardlimit, just let the API do that

This commit is contained in:
nai-degen 2023-04-11 12:10:58 -07:00 committed by nai-degen
parent bbcc76266f
commit a98665f013
1 changed files with 3 additions and 4 deletions

View File

@ -141,10 +141,9 @@ export class KeyPool {
public update(keyHash: string, update: KeyUpdate) {
const keyFromPool = this.keys.find((k) => k.hash === keyHash)!;
Object.assign(keyFromPool, { ...update, lastChecked: Date.now() });
// Disable the key if it's over the hard limit, provi
if (update.usage && keyFromPool.usage >= keyFromPool.hardLimit) {
this.disable(keyFromPool);
}
// if (update.usage && keyFromPool.usage >= keyFromPool.hardLimit) {
// this.disable(keyFromPool);
// }
}
public disable(key: Key) {