Skip to content

Commit

Permalink
Revert "Merge pull request #113 from mrrfv/cf-ratelimit-fix"
Browse files Browse the repository at this point in the history
This reverts commit a3ade64, reversing
changes made to 25db4f7.
  • Loading branch information
mrrfv committed Jun 9, 2024
1 parent a3ade64 commit a1fba53
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ export const createZeroTrustListsOneByOne = async (items) => {
totalListNumber--;
listNumber++;
console.log(`Created "${listName}" list - ${totalListNumber} left`);
/*
Sleep for 4 seconds to work around an undocumented Cloudflare API rate limit.
This should be removed once the issue is fixed on their side.
*/
await new Promise((r) => setTimeout(r, 4 * 1000));
} catch (err) {
console.error(`Could not create "${listName}" - ${err.toString()}`);
throw err;
Expand Down Expand Up @@ -111,11 +106,6 @@ export const deleteZeroTrustListsOneByOne = async (lists) => {
await deleteZeroTrustList(id);
totalListNumber--;
console.log(`Deleted ${name} list - ${totalListNumber} left`);
/*
Sleep for 4 seconds to work around an undocumented Cloudflare API rate limit.
This should be removed once the issue is fixed on their side.
*/
await new Promise((r) => setTimeout(r, 4 * 1000));
} catch (err) {
console.error(`Could not delete ${name} - ${err.toString()}`);
throw err;
Expand Down

0 comments on commit a1fba53

Please sign in to comment.