Skip to content

Commit

Permalink
bypass secondary rate limit when clearing cache (#2706)
Browse files Browse the repository at this point in the history
<!--
Open the PR up as a draft until you feel it is ready for a proper
review.

Do not make PR:s from your own `main` branch, as that makes it difficult
for reviewers to add their own fixes.

Add any improvements to the branch as new commits to make it easier for
reviewers to follow the progress. All commits will be squashed to a
single commit once the PR is merged into `main`.

Make sure you mention any issues that this PR closes in the description,
as well as any other related issues.

To get an auto-generated PR description you can put "copilot:summary" or
"copilot:walkthrough" anywhere.
-->

### What

### Checklist
* [ ] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [ ] I've included a screenshot or gif (if applicable)
* [ ] I have tested [demo.rerun.io](https://demo.rerun.io/pr/{{
pr.number }}) (if applicable)

- [PR Build Summary](https://build.rerun.io/pr/{{ pr.number }})
- [Docs preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/docs)
- [Examples preview](https://rerun.io/preview/{{
"pr:%s"|format(pr.branch)|encode_uri_component }}/examples)
  • Loading branch information
jprochazk committed Jul 17, 2023
1 parent 4b5659e commit 9526944
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/clear_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
}, 500);
let promises = [];
for (let page = 1; page <= pages; page++) {
const cache_page = await github.rest.actions.getActionsCacheList({
per_page,
Expand All @@ -52,6 +51,11 @@ jobs:
}
await Promise.all(promises);
promises = [];
// wait 60 seconds every 4 pages (secondary rate limit)
if (page % 4 === 0) {
await new Promise(f => setTimeout(f, 60_000));
}
}
clearInterval(_id);
Expand Down

0 comments on commit 9526944

Please sign in to comment.