-
Notifications
You must be signed in to change notification settings - Fork 2
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
DBREF lib alternative solution? #55
Comments
@tmushayahama Yeah, honestly, GitHub never works well as a fileserver. I would try |
I can't even find a repository where the |
Any solution to this, it dies occasionally. Maybe since I am developing and refreshing too often, my IP gets some soft ban or reach rate limit. (I just wait for like a minute) Should we just temporarily create a file called dbrefs.json inhouse constants and copy its current GitHub contents. Or maybe just make the dbxref library function inhouse and provide the error checking when fetching to GitHub, it is only a tiny function. Or if there is a proper api available |
Does this not fit the criteria? http://current.geneontology.org/metadata/db-xrefs.json |
Something to think about Slow Initial Load Due to DB-Xrefs DependenciesCurrent BehaviorThe component's initialization is currently blocked waiting for Code Exampleasync initDBXrefs() {
try {
await this.dbxrefService.init();
while (!this.dbxrefService.isReady()) {
await new Promise(resolve => setTimeout(resolve, 100));
}
if (this.dbxrefService.hasError()) {
throw new Error('Failed to initialize dbxrefs');
}
this.dbXrefsReady = true;
} catch (error) {
console.error('Failed to initialize dbxrefs:', error);
this.dbXrefsReady = false;
}
}
async componentWillLoad() {
await this.initDBXrefs();
this.initCytoscape();
} Potential Solutions
Note: Just to note, if the api fails, it will load the widget without clickable links |
@tmushayahama Out of curiosity, what is the load time for https://current.geneontology.org/metadata/db-xrefs.json versus the rest of the app? Could it just be loaded initially in parallel? I'm a little surprised that it's an issue, as it's a file out of AWS's CDN and should hopefully not be too laggy... |
@tmushayahama @kltm @pkalita-lbl Should we keep this ticket open? If so, please add assignees, labels, and let me know what project it should be in. Thanks. |
There is a lib being used called @geneontology/dbxrefs. it seemed like a hack lib as it is relying on GitHub as a api. Sometimes it doesnt work, maybe too many calls, any better solutions
For the curious : Sample code
see the URL and the line of the error is
dbxrefs.filter
if GitHub says no dbxref, it throws an error that filter of undefinedcc @kltm @pkalita-lbl and maybe @sierra-moxon might no if there is an api for this
The text was updated successfully, but these errors were encountered: