Skip to content

Commit

Permalink
add delay
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticroentgen committed Mar 21, 2024
1 parent a594816 commit c5f3005
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {default: PQueue} = require('p-queue');
const yaml = require('js-yaml');
const fs = require('fs');


const delay = ms => new Promise(res => setTimeout(res, ms));
async function getGithubRepositories(username, token, mirrorPrivateRepositories, isOrg) {
const octokit = new Octokit({
auth: token || null,
Expand Down Expand Up @@ -195,6 +195,9 @@ async function yamlOrg() {
const githubRepositories = await getGithubRepositories(org, githubToken, false, true);
console.log(`\tFound ${githubRepositories.length} repositories on github`);
repos.push(...githubRepositories)
console.log("waiting 60sec...")
await delay(60000);


}

Expand Down

0 comments on commit c5f3005

Please sign in to comment.