Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

Commit

Permalink
Improves delays between requests
Browse files Browse the repository at this point in the history
  • Loading branch information
SzymonLisowiec authored Sep 1, 2020
1 parent 95bd221 commit a67563b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion update.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ class Main {
const element = result.elements[i];
this.saveOffer(element);
}
await this.sleep(1000);
} while (paging.start - this.perPage < paging.total - paging.count);
}

Expand All @@ -182,7 +183,7 @@ class Main {
}
console.log(JSON.stringify(error.response, null, 2));
console.log('Next attempt in 1s...');
await this.sleep(1000);
await this.sleep(5000);
return this.fetchOffers(...arguments);
} else {
throw new Error(error);
Expand Down

0 comments on commit a67563b

Please sign in to comment.