Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Commit

Permalink
Look into rate limiting through Octokit plugin and remove... #78
Browse files Browse the repository at this point in the history
Fixes #78

Removing last of SAB and atmoics check that were left after initial
sweep in Octokit upgrade.

Signed-off-by: Martin Lowe <martin.lowe@eclipse-foundation.org>
  • Loading branch information
autumnfound committed Jan 26, 2021
1 parent 678d82b commit ed2f327
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/Sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ const DEFAULT_ORG_PERMISSIONS = {
members_can_create_public_repositories: false,
members_allowed_repository_creation_type: 'none',
};
const MB_IN_BYTES = 1024;
const DEFAULT_WAIT_PERIOD_IN_MS = 500;
const API_OK_STATUS = 200;
const EXIT_ERROR_STATE = 1;

Expand All @@ -74,11 +72,6 @@ var eclipseApi;
var bots;
var stm;

// thread sleeping to prevent abuse of API
var sab = new SharedArrayBuffer(MB_IN_BYTES);
var int32 = new Int32Array(sab);
const waitTimeInMS = DEFAULT_WAIT_PERIOD_IN_MS;

_prepareSecret();

/**
Expand Down Expand Up @@ -359,8 +352,6 @@ async function updateTeam(org, teamName, designatedMembers) {
// remove just the user that matches the username
members = members.filter(e => e.login.localeCompare(user.github_handle, undefined, { sensitivity: 'base' }));
}
// wait to make sure that we don't abuse GitHub API
Atomics.wait(int32, 0, 0, waitTimeInMS);
}

console.log(`Leftover members: ${JSON.stringify(members)}`);
Expand Down Expand Up @@ -455,7 +446,6 @@ async function removeOrgExternalContributors(projects, org) {
}
// get the collaborators
var collaborators = await wrap.getOrgCollaborators(org);
Atomics.wait(int32, 0, 0, waitTimeInMS);
if (collaborators === undefined) {
console.log(`Error while fetching collaborators for ${org}`);
return;
Expand Down

0 comments on commit ed2f327

Please sign in to comment.