-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix collection update. Validation. Chunks #58
Conversation
OlegMakarenko
commented
Mar 30, 2021
•
edited
Loading
edited
- Improve db collections update transaction
- Added node model validation
- Node list splitted into the chunks and added delay of getting info
- Added initial node list into the loop
src/services/NodeMonitor.ts
Outdated
...nodeInfo.data, | ||
host, | ||
}); | ||
} catch (e) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it may good to add logger.error
inside the catch, at least we know which nodeUrl have an issue during the get request?
src/services/NodeMonitor.ts
Outdated
private fetchNodesByURL = async (nodeUrl: string, includeCurrent: boolean = false): Promise<Array<INode>> => { | ||
let nodeList = []; | ||
|
||
if (includeCurrent === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we can rename it to isIncludeCurrent
and if (isIncludeCurrent)
will be enough?