fixes Force Key Recheck admin function for azure/aws

This commit is contained in:
nai-degen
2024-02-07 19:54:40 -06:00
parent ecc804887b
commit bbee056114
5 changed files with 18 additions and 13 deletions
@@ -192,6 +192,7 @@ export class AwsBedrockKeyProvider implements KeyProvider<AwsBedrockKey> {
this.keys.forEach(({ hash }) =>
this.update(hash, { lastChecked: 0, isDisabled: false })
);
this.checker?.scheduleNextCheck();
}
/**
+2 -1
View File
@@ -33,7 +33,7 @@ const RATE_LIMIT_LOCKOUT = 4000;
* to be used again. This is to prevent the queue from flooding a key with too
* many requests while we wait to learn whether previous ones succeeded.
*/
const KEY_REUSE_DELAY = 250;
const KEY_REUSE_DELAY = 500;
export class AzureOpenAIKeyProvider implements KeyProvider<AzureOpenAIKey> {
readonly service = "azure";
@@ -194,6 +194,7 @@ export class AzureOpenAIKeyProvider implements KeyProvider<AzureOpenAIKey> {
this.keys.forEach(({ hash }) =>
this.update(hash, { lastChecked: 0, isDisabled: false })
);
this.checker?.scheduleNextCheck();
}
/**