Skip to content

Commit

Permalink
1400 rescoring (passportxyz#1443)
Browse files Browse the repository at this point in the history
* feat(app): added BULK_PROCESSING score status

* feat(devops): added yarn debug command to start iam with debugger listening
  • Loading branch information
lucianHymer authored Jul 7, 2023
1 parent 0dc836c commit 0203761
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/context/scorerContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type PassportSubmissionStateType =
| "APP_REQUEST_PENDING"
| "APP_REQUEST_ERROR"
| "APP_REQUEST_SUCCESS";
export type ScoreStateType = "APP_INITIAL" | "PROCESSING" | "ERROR" | "DONE";
export type ScoreStateType = "APP_INITIAL" | "BULK_PROCESSING" | "PROCESSING" | "ERROR" | "DONE";

export interface ScorerContextState {
score: number;
Expand Down Expand Up @@ -98,7 +98,7 @@ export const ScorerContextProvider = ({ children }: { children: any }) => {
let requestCount = 1;
let scoreStatus = await loadScore(address, dbAccessToken);

while (scoreStatus === "PROCESSING" && requestCount < maxRequests) {
while ((scoreStatus === "PROCESSING" || scoreStatus === "BULK_PROCESSING") && requestCount < maxRequests) {
requestCount++;
await new Promise((resolve) => setTimeout(resolve, sleepTime));
if (sleepTime < 10000) {
Expand Down
1 change: 1 addition & 0 deletions iam/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build": "tsc",
"prestart": "yarn run build",
"start": "node .",
"debug": "node --inspect .",
"prod:start": "tsc && node .",
"test": "jest --verbose",
"prettier": "prettier --write .",
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"build:iam": "yarn workspace @gitcoin/passport-iam build",
"build:app": "yarn workspace @gitcoin/passport-app build",
"build:platforms": "yarn workspace @gitcoin/passport-platforms build",
"debug": "concurrently --kill-others \"yarn debug:iam\" \"yarn start:app\" \"yarn start:signer\"",
"debug:iam": "yarn workspace @gitcoin/passport-iam debug",
"start": "concurrently --kill-others \"yarn start:iam\" \"yarn start:app\" \"yarn start:signer\"",
"start:iam": "yarn workspace @gitcoin/passport-iam start",
"start:signer": "yarn workspace @gitcoin/passport-signer start",
Expand Down

0 comments on commit 0203761

Please sign in to comment.