Skip to content

Commit

Permalink
fix: Increase number of retries
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeboer committed Jul 11, 2024
1 parent 70bb406 commit d543289
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ export class Importer extends EventEmitter<Events> {
}

/**
* Wait for data to be available in the SPARQL store
* Wait for data to be available in the SPARQL store.
*/
private async dataLoaded() {
const query = `SELECT * FROM <${this.graph.value}> WHERE { ?s ?p ?o } LIMIT 1`;
await pRetry(
async () => {
const result = await this.queryEngine.queryBindings(

Check failure on line 49 in src/import.ts

View workflow job for this annotation

GitHub Actions / test (lts/*)

Replace `⏎··········query,⏎·········` with `query,`
`SELECT * FROM <${this.graph.value}> WHERE { ?s ?p ?o } LIMIT 1`,
query,
{
sources: [

Check failure on line 52 in src/import.ts

View workflow job for this annotation

GitHub Actions / test (lts/*)

Replace `············` with `··········`
{

Check failure on line 53 in src/import.ts

View workflow job for this annotation

GitHub Actions / test (lts/*)

Delete `··`
Expand All @@ -58,10 +59,10 @@ export class Importer extends EventEmitter<Events> {
);
const results = await result.toArray();
if (results.length === 0) {
throw new Error('No data loaded');
throw new Error(`No data loaded (based on query ${query})`);
}
},
{retries: 3}
{retries: 5}
);
}

Expand Down

0 comments on commit d543289

Please sign in to comment.