Skip to content

Commit

Permalink
make retries and interval bigger & configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ocean committed Dec 13, 2024
1 parent 0bc6f0b commit 2b6e537
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/services/Aquarius.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export class Aquarius {
public async waitForAqua(
did: string,
txid?: string,
signal?: AbortSignal
signal?: AbortSignal,
interval: number = 3000,
maxRetries: number = 100
): Promise<Asset> {
let tries = 0
do {
Expand All @@ -80,9 +82,9 @@ export class Aquarius {
} catch (e) {
// do nothing
}
await sleep(1500)
await sleep(interval)
tries++
} while (tries < 100)
} while (tries < maxRetries)
return null
}

Expand Down

0 comments on commit 2b6e537

Please sign in to comment.