We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b2e6185 + a8b1e94 commit e1596e8Copy full SHA for e1596e8
lib/commands/unipept/unipept_subcommand.ts
@@ -241,8 +241,8 @@ export abstract class UnipeptSubcommand {
241
242
if (shouldRetry) {
243
// retry with delay
244
- // console.error("retrying");
245
- const delay = 5000 * Math.random();
+ const delay = Math.ceil(5000 * Math.random());
+ process.stderr.write(`> Request failed: ${error}. Retrying in ${(delay / 1000).toFixed(1)}s...\n`);
246
await new Promise(resolve => setTimeout(resolve, delay));
247
return this.fetchWithRetry(url, options, retries - 1);
248
} else {
0 commit comments