Skip to content

Commit

Permalink
remove fname retry
Browse files Browse the repository at this point in the history
  • Loading branch information
aditiharini committed Jan 17, 2025
1 parent 13992bb commit 99373fd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions apps/hubble/src/storage/engine/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1038,17 +1038,17 @@ class Engine extends TypedEmitter<EngineEvents> {

const result = await ResultAsync.fromPromise(this._userDataStore.getUserNameProof(name), (e) => e as HubError);

if (result.isErr() && result.error.errCode === "not_found" && retries > 0 && this._fNameRegistryEventsProvider) {
const rateLimitResult = await ResultAsync.fromPromise(
this._fNameRetryRateLimiter.consume(0),
() => new HubError("unavailable", "Too many requests to fName server"),
);
if (rateLimitResult.isErr()) {
return err(rateLimitResult.error);
}
await this._fNameRegistryEventsProvider.retryTransferByName(name);
return this.getUserNameProof(name, retries - 1);
}
// if (result.isErr() && result.error.errCode === "not_found" && retries > 0 && this._fNameRegistryEventsProvider) {
// const rateLimitResult = await ResultAsync.fromPromise(
// this._fNameRetryRateLimiter.consume(0),
// () => new HubError("unavailable", "Too many requests to fName server"),
// );
// if (rateLimitResult.isErr()) {
// return err(rateLimitResult.error);
// }
// await this._fNameRegistryEventsProvider.retryTransferByName(name);
// return this.getUserNameProof(name, retries - 1);
// }

return result;
}
Expand Down

0 comments on commit 99373fd

Please sign in to comment.